Posts

Showing posts from November, 2016

sysstat iostat

apt-get install sysstat раз в 10 секунд получать данные о нагрузке на HDD команда просмотра нагрузки на диски iostat -x 10

sysstat sar disk statistics | CPU | Memory Free | Swap | IO | Network

sysstat includes tools that can also report on CPU and RAM utilization. Although it’s true you can already do this with top, what makes sysstat even more useful is that it provides a simple mechanism to log system statistics like CPU load, RAM, and I/O stats .  View Disk Statistics Another useful metric to pull from sar is disk statistics. The -b option gives you a basic list of disk I/O information:  $ sar -b Linux 2.6.24-22-server (kickseed)  01/07/2012 07:44:20 PM tps rtps wtps bread/s bwrtn/s  07:45:01 PM 8.03 0.00 8.03 0.00 106.61  07:55:01 PM 8.78 0.14 8.64 3.35 127.59  08:05:01 PM 7.16 0.00 7.16 0.00 61.14  08:15:01 PM 8.17 0.14 8.03 5.82 139.02  08:25:01 PM 9.50 0.06 9.44 4.09 212.62  08:35:01 PM 8.27 0.00 8.27 0.01 74.66  08:45:01 PM 8.04 0.00 8.04 0.00 71.51  08:55:01 PM 7.64 0.00 7.64 0.00 66.46  09:01:18 PM 7.11 0.00 7.11 0.36 63.73  09:05:01 PM 7.61 0.00 7.61 0.00 72.11  Average: 8.11 0.04 8.06 1.67 102.52  Here you can see the number of total transac

history delete particular lines

My answer is based on previous answers, but with the addition of reversing the sequence so that history items are deleted from most recent to least recent. Get your current history (adjust the number of lines you want to see): history | tail - n 10 This gives me something like 1003 25 - 04 - 2016 17 : 54 : 52 echo "Command 1" 1004 25 - 04 - 2016 17 : 54 : 54 echo "Command 2" 1005 25 - 04 - 2016 17 : 54 : 57 echo "Command 3" 1006 25 - 04 - 2016 17 : 54 : 59 echo "Command 4" 1007 25 - 04 - 2016 17 : 55 : 01 echo "Command 5" 1008 25 - 04 - 2016 17 : 55 : 03 echo "Command 6" 1009 25 - 04 - 2016 17 : 55 : 07 echo "Command 7" 1010 25 - 04 - 2016 17 : 55 : 09 echo "Command 8" 1011 25 - 04 - 2016 17 : 55 : 11 echo "Command 9" 1012 25 - 04 - 2016 17 : 55 : 14 echo "Command 10" Select the start and end positions for the items you want to