watch
Linux Command – watch ใช้ในการ monitor process ที่ทำงานอยู่
คำสั่ง
watch <command>
$ watch free Every 2.0s: free Wed May 10 13:09:54 2017 total used free shared buff/cache available Mem: 3969412 2304100 834428 66476 830884 1316136 Swap: 1756156 765192 990964
total used free shared buff/cache available Mem: 3969412 2302888 835672 66476 830852 1317392 Swap: 1756156 765192 990964
โครงสร้างคำสั่ง
arch [OPTION]...
รายละเอียด
เป็นคำสั่งที่ใช้ในการ monitor process ที่ทำงานอยู่ เช่น การ copy ข้อมูล ขนาด file ที่กำลังโตขึ้น หรือ ข้อมูล free memory แบบ realtime
Option
-d, --differences [permanent] Highlight the differences between successive updates. Option will read optional argument that changes highlight to be permanent, allowing to see what has changed at least once since first iteration. -n, --interval seconds Specify update interval. The command will not allow quicker than 0.1 second interval, in which the smaller values are converted. -p, --precise Make watch attempt to run command every interval seconds. Try it with ntptime and notice how the fractional seconds stays (nearly) the same, as opposed to normal mode where they continuously increase. -t, --no-title Turn off the header showing the interval, command, and current time at the top of the display, as well as the following blank line. -b, --beep Beep if command has a non-zero exit. -e, --errexit Freeze updates on command error, and exit after a key press. -g, --chgexit Exit when the output of command changes. -c, --color Interpret ANSI color and style sequences. -x, --exec command is given to sh -c which means that you may need to use extra quoting to get the desired effect. This with the --exec option, which passes the command to exec(2) instead. -h, --help Display help text and exit. -v, --version Display version information and exit.
กลุ่มคำสั่ง
–
Reference:
Author: Suphakit Annoppornchai
Credit: https://saixiii.com