26.06.2015 Views

Unix/Linux

Unix/Linux

Unix/Linux

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

while/do/donedd<br />

whileddddCdddddddddddddddddddddd<br />

✞<br />

#!/bin/bash<br />

#Program: monitor.sh<br />

# Author: HM Li <br />

# Date: 09−12−14<br />

#Comment: Monitor CPU and Memory<br />

while [ 0 ]<br />

do<br />

date<br />

echo −−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−<br />

echo ”RUSER PID %CPU COMMAND %MEM SZ”<br />

ps −o ”%u %p %C %c” −o ”%mem,size” −U mgbouc,muxd,heyong | sort −nr −k 5 | head −n 10<br />

sleep 10<br />

done<br />

✡✝<br />

ddddddddddddddddd killddd<br />

✆<br />

ddd (ddddddd) <strong>Unix</strong>/<strong>Linux</strong>dddddddd 2009d12d 130 / 173

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!