Flag | Usage |
---|---|
-A --audio | |
-b --basic | |
-B --battery | |
-c --color | disable colors with -c 0 |
-C --cpu | |
-G --graphics | -Gx, -Gxx, -Gxxx for increased verbosity |
-L --logical | show logical volume information, for LVM, LUKS, bcache, etc |
-m --memory | |
-M --machine | show machine data :
|
-N --network | |
-S --system | |
-J --usb |
Flag | Usage |
---|---|
-a --all | show information about all 3 sources (default) : |
-c --creator | show creator and owner |
--human | print sizes in human-readable format |
-l --limit | show resource limits |
-m --shmems | show information about shared memory segments |
-p --pid | show PIDs of creator (in cpid column) and last operator (in lpid column) |
-q --queues | show information about active message queues |
-s --semaphores | show information about active semaphores sets |
------ Shared Memory Creator/Last-op PIDs -------- shmid owner cpid lpid 8945664 root 4974 18423 8716295 root 1289 1289 8749064 apache 1289 18423 8781833 apache 1289 18423 8814602 apache 1289 18423 8847371 apache 1289 18423 8880140 apache 1289 18423 8912909 apache 1289 18423
(nothing)The process 1289 initiated a shared memory segment, was the last process to operate on this memory segment, but it's dead now. Looks like a memory leak.
install = mkdir -p + chown + chmod
Copy files while setting their file mode (aka permission) bits and, if possible, their owner and group.install, install is very convenient to do things like :
mkdir -p /path/to/my/dir && chown bob:developers /path/to/my/dir && chmod 700 /path/to/my/dir
with a single command :install -d /path/to/my/dir -o bob -g developers -m 700
Flag | Usage |
---|---|
-d some/directory --directory some/directory |
|
-g group --group group | set the group ownership of installed files or directories to group |
-m mode --mode mode | set the file mode bits for the installed file or directory to mode, which can be either an octal number (700) or a symbolic mode (u=rwx,go=) as in chmod |
-o user --owner user | set the ownership of installed files or directories to user |
Flag | Usage |
---|---|
-m --monitor | Instead of exiting after receiving a single event, execute indefinitely |
--format formatSpec | Output in a user-specified format, using printf-like syntax :
|
[1] 15730 Setting up watches. Watches established.
EVENT: "CREATE", FILE: "newFile" EVENT: "OPEN", FILE: "newFile" EVENT: "ATTRIB", FILE: "newFile" EVENT: "CLOSE_WRITE:CLOSE", FILE: "newFile"
EVENT: "MODIFY", FILE: "newFile" EVENT: "OPEN", FILE: "newFile" EVENT: "MODIFY", FILE: "newFile" EVENT: "CLOSE_WRITE:CLOSE", FILE: "newFile"
EVENT: "OPEN", FILE: "newFile" EVENT: "MODIFY", FILE: "newFile" EVENT: "CLOSE_WRITE:CLOSE", FILE: "newFile"
EVENT: "DELETE", FILE: "newFile"
#!/usr/bin/env bash fileToWatch='path/to/some/file' [ -f "$fileToWatch" ] && rm "$fileToWatch" while true; do [ -f "$fileToWatch" ] && { echo 'file created'; exit; } done
Flag | Usage |
---|---|
-c classValue | Apply the specified class value to the process. Class values :
|
-n priority | Priority of job within its class. Ranges from 0 (highest) to 7 (lowest). |
-p PID | Apply to the specified process ID |
root permissions are required to :
Flag | Usage |
---|---|
-i interface | Listen on interface |
Flag | Usage |
---|---|
? | show help |
Flag | Usage |
---|---|
-c | display the CPU usage report |
-d | display the device usage report |
-h | make the NFS report human-readable |
-m | display statistics in megabytes per second instead of blocks or kilobytes per second |
-n | display the network filesystem (NFS) report |
-x | display extended statistics |
Flag | Usage |
---|---|
-u --user | print only the effective user ID |
-n --name | print a name instead of a number
If you need to get the current user name :
|
default via 192.168.105.254 dev eth0 proto static metric 100
8.8.8.8 via 10.0.2.2 dev eth0 src 10.0.2.15 cache
Flag | Usage |
---|---|
-a --accumulated | Show accumulated I/O instead of bandwidth. In this mode, iotop shows the amount of I/O processes have done since iotop started. |
-b --batch | Turn on non-interactive mode. Useful for logging I/O usage over time. |
-d seconds --delay=seconds | Set the delay between iterations in seconds (1 second by default). Accepts non-integer values such as 1.1 seconds. |
-o --only | Show only processes doing I/O instead of showing them all. Can be toggled dynamically by pressing o. |
-P --processes | Show only processes (processes + threads by default) |
-p PIDs --pid=PIDs | Monitor PIDs (all by default) |
-u users --user=users | Monitor processes from the users list (all by default) |