acceptコマンド

acceptコマンド

 

cupsaccept/cupsreject - 宛先に送信されたジョブを受け入れる/拒否する

 

ちょっと説明からだと具体的に何ができるのかがわからない。

 

lrwxrwxrwx 1 root root 10 3月 3 20:28 accept -> cupsaccept*

このコマンドはcupsacceptへのリンクのようだ。

 

DESCRIPTION
The cupsaccept command instructs the printing system to accept print jobs to the specified destinations.

The cupsreject command instructs the printing system to reject print jobs to the specified destinations. The -r option sets the
reason for rejecting print jobs. If not specified, the reason defaults to "Reason Unknown".

 

  (cupsacceptコマンドの説明) プリンタへ任意のジョブを受け入れるように指示するコマンドのようだ。


逆に今回のコマンドではないがcupsrejectコマンドはプリンタへ任意のジョブを拒否するように指示するコマンドもあるようだ。 

 

 

 

aa-statusコマンド

もう毎日書いてないとか気にしない。仕事が忙しくなると時間を取れなくなるのは仕方ない。

 

aa-statusコマンド

 

aa-status - AppArmorポリシーの情報表示コマンド

 

DESCRIPTION
aa-status will report various aspects of the current state of AppArmor confinement. By default, it displays the same information
as if the --verbose argument were given. A sample of what this looks like is:

apparmor module is loaded.
110 profiles are loaded.
102 profiles are in enforce mode.
8 profiles are in complain mode.
Out of 129 processes running:
13 processes have profiles defined.
8 processes have profiles in enforce mode.
5 processes have profiles in complain mode.

Other argument options are provided to report individual aspects, to support being used in scripts.

 

AppArmorによるプログラムの制限状態を報告するコマンドの模様。

 

アルファベット順でaaってなると大体AppArmor関連って事かな。

aa-remove-unknownコマンド

たびたび仕事の調べ事しててスキップしそうだった。。。怖い

 

aa-remove-unknownコマンド

 

aa - remove - unknown - 不明なAppArmor*1プロファイルを削除コマンド

 

DESCRIPTION
aa-remove-unknown will inventory all profiles in /etc/apparmor.d/, compare that list to the profiles currently loaded into the
kernel, and then remove all of the loaded profiles that were not found in /etc/apparmor.d/. It will also report the name of each
profile that it removes on standard out.

 

/etc/apparmor.d/配下のプロファイル一覧と、カーネルにロードされてるプロファイルと比較して/etc/apparmor.d/に存在しないプロファイルを削除するコマンドのようだ。

/sbin関連のコマンドはそんなに頻繁に使わないからよくわからんな。

*1:Wikipediaより AppArmor (Application Armor) とは、Linux Security Modulesの一種であり、各プログラムにセキュリティプロファイルを結びつけ、プログラムのできることに制限をかけるプログラムである。

NetworkManagerコマンド

いきなり一日でスキップしそうになってしまった。。。。

時間を決めてやらないとダメっぽいな。

 

 今日は、NetworkManagerコマンド

 

NetworkManager - ネットワーク管理デーモン

 

説明は以下

DESCRIPTION
The NetworkManager daemon attempts to make networking configuration and
operation as painless and automatic as possible by managing the primary
network connection and other network interfaces, like Ethernet, WiFi,
and Mobile Broadband devices. NetworkManager will connect any network
device when a connection for that device becomes available, unless that
behavior is disabled. Information about networking is exported via a
D-Bus interface to any interested application, providing a rich API
with which to inspect and control network settings and operation.

 

ネットワークインターフェイス(EthernetWifi等)を管理するデーモンの模様。
ネットワークデバイスに利用可能になった時に接続するのもこのデーモンみたい。Wifiの接続範囲に近づいたときに自動で接続するのはこのデーモンによるものなのだろう。

 

以上!

ModemManagerコマンド

まずはパスを確認する。

xxxxx@xxxxx:~$ echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin

/usr/local/sbin、/usr/local/binには何も入ってない

xxxxx@xxxxx:~$ ll /usr/local/sbin
合計 8
drwxr-xr-x 2 root root 4096 7月 25 2018 ./
drwxr-xr-x 10 root root 4096 7月 25 2018 ../
xxxxx@xxxxx:~$ ll /usr/local/bin
合計 8
drwxr-xr-x 2 root root 4096 7月 25 2018 ./
drwxr-xr-x 10 root root 4096 7月 25 2018 ../

/usr/sbinを見たところ

xxxxx@xxxxx:~$ ll /usr/sbin
合計 15612
drwxr-xr-x 2 root root 12288 3月 5 23:48 ./
drwxr-xr-x 10 root root 4096 7月 25 2018 ../
-rwxr-xr-x 1 root root 1219648 4月 24 2018 ModemManager*


お!コマンド発見。
ModemManager:モバイルブロードバンドモデム管理デーモン

DESCRIPTION
ModemManager provides a unified high level API for communicating with
mobile broadband modems, regardless of the protocol used to communicate
with the actual device (Generic AT, vendor-specific AT, QCDM, QMI,
MBIM...).

ModemManager is a DBus-based system daemon and is not meant to be used
directly from the command line.

説明を見ると「モバイルブロードバンドモデムとの通信APIを提供するデーモン」の模様。実行するコマンドではないみたい。

コマンド名見ればなんとなくモデム関連ってのはわかる。

 

以上!

オレオレLinuxコマンドリファレンス

今、メインマシンがLinuxubuntu)で仕事でもLinux自体は6年ぐらい触ってたけど、よく考えたらどんなコマンドがあるのかとかよくわかってないなーと、ふと気づく。

 

ブログの更新も全然出来てないし、ちょうどいいのでLinuxに入っているコマンドがどんなことができるものなのか一通り見て説明書いてみようと思いついた。
よくある(と思う)コマンドは端折る。


継続的な記事更新が目的なので、オプションの詳細や利用例はとりあえず書かないで、どんなことができるコマンドか?だけを訳す感じ。

 

  • 環境は「ubuntu 18.04.2 LTS」。
  • とりあえずPATHの通っているところを上からマニュアル見ていく感じですすめる。

可能な限り毎日1コマンドは書いていきたい所存。

VMware ESXiを導入出来なかった話

いままで、VMware ESXi 5.1を使っていたがメインマシンのWindowsがかなり前にオシャカになってしまったので放置していた。
んで、転職の気分転換ついでに調べてみたところVMware ESXi 6.5 Update2からはブラウザで操作できる「vSphere Web Client 」なるものが使えるようになったらしい。
これは便利と思いバージョンアップするべくやってみる。

本家から、ESXi 6.5 Update2のisoをダウンロードしてインストールしたら以下の表示

No network adapters

ググってみるといくつも見つかった。ドライバ対応の問題でRealtekNIC認識しないらしい。

VMware ESXi 6.5のインストールでNICとHDDが認識されずハマった話
ESXi のカスタム ISO を作る備忘録


必要なものはざっくり以下の模様

  • VMware PowerCLI 6.5 Release 1
  • ESXi-Customizer-PS v2.5
  • 今回突っ込みたいドライバ(Realtek NIC on vSphere 6)

もともとはメインで利用しているLinuxXubuntu)で対応したかったので、以下でPowerCLI導入を試してしてみたけど、断念。

www.altaro.com

別途持っているサブ機のWindows7で対応。

ESXi-Customizer-PSは以下からダウンロード

www.v-front.de


PowerCLIを起動したら権限エラーが出るため以下を実行。
Set-ExecutionPolicy Unrestricted


その後、追加するドライバを以下からダウンロードして、適当なフォルダにまとめておく

https://vibsdepot.v-front.de/wiki/index.php/List_of_currently_available_ESXi_packages

 で、以下のコマンドで「-pkgDir」でダウンロードしたドライバのファイルを指定するとESXi-Customizer-PSと同じパスにisoが出来上がっている。

./ESXi-Customizer-PS-v2.6.0.ps1 -v65 -load net-r8168,net-r8169,net-r8101,net-r8139too -pkgDir C:\Users\XXXX\Downloads\vid

314MB程度だったので、CDに焼こうとしたらサブ機のDVD/CDドライブがディスクを認識しない。。。。

いざインストールしてみるとNICの問題はクリアしたけど、HDDを認識しない。。。そのまんま同じ問題が起きてる。
USBから起動すると良いとか、普通にsata-xahciってドライバ追加するといけるって書いてあるので試す。

void-asterisk.blogspot.com

以下のコマンドでカスタムイメージを作成

./ESXi-Customizer-PS-v2.6.0.ps1 -v60 -load net-r8168,net-r8169,net-r8101,sata-xahci -pkgDir C:\Users\XXXX\Downloads\vid

再度CDに焼いてインストールしてみるけどHDDを認識しない。

また調べてみると以下のページでBIOSSATA ModeをRAID Modeに変更するとあったので試してみっるがダメだった。BIOSとかが古いってのもあるんだろうか。

zappy.hatenablog.jp

とりあえず土日で2日をかけたが出来ないわけだけど、VMwareにこだわる必要もないので他のハイパーバイザーを選定してみる。


その話はまた後日。