вторник, 30 декабря 2014 г.

HP-UX Проблемы с last

Если ругаетсяlast 
 hpux-0097:/root# last Invalid record size. Unable to continue ...  
Нужно выполнить 
dd if=/dev/null of=/var/adm/wtmps 
Получим 
 [root@hpux-0097 ~]# dd if=/dev/null of=/var/adm/wtmps 0+0 records in 0+0 records out [root@hpux-0097 ~]# last  
WTMPS_FILE  begins at Thu Jan  1 02:59:59

понедельник, 22 декабря 2014 г.

Monitoring SAR + Gnuplot

Простой вывод  
sar -H  30 100 | perl -lane  '$,=qq(\t);if ($F[0] =~/\d\d:\d\d\:\d\d/) { $time=$F[0];shift @F;print "\n"} print $time,@F ' 
sar -dR  -f /var/adm/sa/sa19   | perl -lane 'BEGIN{open F,"< dev_to_ASM.list";local $/="";$_= <F>; %h=(split /\t|\n/ , $_ );};$,=qq(\t);if ($F[0] =~/\d\d:\d\d\:\d\d/) { $time=$F[0];shift @F} print $time, $h{$F[0]},@F  if $F[-1]>20'