commandlinefu.com is the place to record those command-line gems that you return to again and again.
You can sign-in using OpenID credentials, or register a traditional username and password.
Subscribe to the feed for:
Similar to `cpulimit`, although `prlimit` can be found shipped with recent util-linux.
Example: limit CPU consumption to 10% for a math problem which ordinarily takes up 100% CPU:
bc -l <(echo "1234123412341234^12341234")
See the difference `prlimit` makes:
prlimit --cpu=10 bc -l <(echo "1234123412341234^12341234")
To actually monitor the CPU usage, use `top`, `sar`, etc.. or:
pidstat -C 'bc' -hur -p ALL 1
Shows all block devices in a tree with descruptions of what they are.
`blkid` is an interface to libuuid - it can read Device Mapper, EVMS, LVM, MD, and regular block devices.
-c /dev/null - Do not use cached output from /etc/blkid.tab or /etc/blkid/blkid.tab (RHEL)
-i - Display I/O Limits (aka I/O topology) information (not available in RHEL)
-p - Low-level superblock probing mode (not available in RHEL)