逆引きUNIXコマンド/AC電源駆動かバッテリー駆動なのかを確認する方法・on_ac_power
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
検索
|
最終更新
|
ヘルプ
]
開始行:
#navi(../)
* AC電源駆動かバッテリー駆動なのかを確認する方法 [#za68df...
ノートPCがAC電源駆動中なのか、バッテリー駆動中なのかを確...
今回紹介するon_ac_powerコマンドですが、CentOS6, Ubuntu12....
#contents
#htmlinsertpcsp(linux_ads_top.html,linux-sp.html)
* on_ac_powerコマンド [#v24198c1]
CentOS6とUbutnu12.04にインストールされているon_ac_powerの...
違いは以下の通りで、電源が不明の場合のステータス記述がCen...
- CentOS
NAME
on_ac_power - test whether the computer is runnin...
SYNOPSIS
on_ac_power
EXIT CODES
The command succeeds (status 0) if the system is u...
0) otherwise. It is designed to be easy to use in ...
0 (true)
System is on line power.
1 (false)
System is not on line power.
-Ubuntu
NAME
on_ac_power - test whether computer is running on ...
SYNOPSIS
on_ac_power
DESCRIPTION
on_ac_power checks whether the system is running o...
OPTIONS
None.
EXIT STATUS
0 (true) System is on mains power
1 (false) System is not on mains power
255 (false) Power status could not be determined
* 実際にon_ac_powerを使ってみる [#zf48c3ef]
-AC電源の時
sakura@ubuntu:~$ on_ac_power
sakura@ubuntu:~$ echo $?
0
-バッテリー駆動の時
sakura@ubuntu:~$ on_ac_power
sakura@ubuntu:~$ echo $?
1
以上、ノートPCがAC電源駆動中なのかバッテリー駆動中なのか...
#htmlinsertpcsp(linux_ads_btm.html,linux-sp.html)
終了行:
#navi(../)
* AC電源駆動かバッテリー駆動なのかを確認する方法 [#za68df...
ノートPCがAC電源駆動中なのか、バッテリー駆動中なのかを確...
今回紹介するon_ac_powerコマンドですが、CentOS6, Ubuntu12....
#contents
#htmlinsertpcsp(linux_ads_top.html,linux-sp.html)
* on_ac_powerコマンド [#v24198c1]
CentOS6とUbutnu12.04にインストールされているon_ac_powerの...
違いは以下の通りで、電源が不明の場合のステータス記述がCen...
- CentOS
NAME
on_ac_power - test whether the computer is runnin...
SYNOPSIS
on_ac_power
EXIT CODES
The command succeeds (status 0) if the system is u...
0) otherwise. It is designed to be easy to use in ...
0 (true)
System is on line power.
1 (false)
System is not on line power.
-Ubuntu
NAME
on_ac_power - test whether computer is running on ...
SYNOPSIS
on_ac_power
DESCRIPTION
on_ac_power checks whether the system is running o...
OPTIONS
None.
EXIT STATUS
0 (true) System is on mains power
1 (false) System is not on mains power
255 (false) Power status could not be determined
* 実際にon_ac_powerを使ってみる [#zf48c3ef]
-AC電源の時
sakura@ubuntu:~$ on_ac_power
sakura@ubuntu:~$ echo $?
0
-バッテリー駆動の時
sakura@ubuntu:~$ on_ac_power
sakura@ubuntu:~$ echo $?
1
以上、ノートPCがAC電源駆動中なのかバッテリー駆動中なのか...
#htmlinsertpcsp(linux_ads_btm.html,linux-sp.html)
ページ名: