User Tools

Site Tools


shell2

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
shell2 [2020/08/02 15:55] – Added XML XPath tips for Roku ECP Apps list dblumeshell2 [2022/02/02 09:53] – [expect tips] dblume
Line 292: Line 292:
 # at 3 in the morning on Mondays, delete files older than 30 days # at 3 in the morning on Mondays, delete files older than 30 days
 0 3 * * 1 find $HOME/.vim/backup/ -type f -mtime +30 -delete 0 3 * * 1 find $HOME/.vim/backup/ -type f -mtime +30 -delete
 +</code>
 +
 +====== Calculate web server bandwidth ======
 +
 +Use ''awk'' to add up a column from Apache logs:
 +
 +<code>
 +$ sudo cat /var/log/httpd/access_log | awk '{SUM+=$10}END{print SUM/1024/1024}'
 +0.855597
 </code> </code>
  
Line 370: Line 379:
 Alternatively, to see the RSS use of that process alone: Alternatively, to see the RSS use of that process alone:
 <code bash> <code bash>
-while true; do sync; cat /proc/$(pidof yourprocess)/status | grep VmRSS; sleep 1; done+PID=$(pidof yourprocess); while true; do sync; grep VmRSS /proc/$PID/status; sleep 1; done
 </code> </code>
 ====== Measuring Available Memory ====== ====== Measuring Available Memory ======
shell2.txt · Last modified: 2023/05/17 09:47 by dblume