Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions memstat.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# Also make sure you install bc command.


Source : http://www.expertslogin.com/linux-shell-script/linux-memory-usage-program/
#Source : http://www.expertslogin.com/linux-shell-script/linux-memory-usage-program/

# Make sure only root can run our script

Expand Down Expand Up @@ -82,7 +82,7 @@ echo -n "${value} ${reg} "
[[ -f /tmp/res3 ]] && rm -f /tmp/res3


#if argument passed script will show statistic only for that pid, of not � we list all processes in /proc/ #and get statistic for all of them, all result we store in file /tmp/res
#if argument passed script will show statistic only for that pid, of not � we list all processes in /proc/ #and get statistic for all of them, all result we store in file /tmp/res
if [ $# -eq 0 ]
then
pids=`ls /proc | grep -e [0-9] | grep -v [A-Za-z] `
Expand Down