Re: Help with memory usage

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> Change:
>
>> ps -ef|grep $1|grep -v grep|tr -s " "|cut -d " " -f2 >
>> /tmp/will_memory_usage.txt
>
> to: ps -ef|grep $1|grep =v grep|tr =s " "|cut -d " " -f2 >>
> /tmp/will_memory_usage.txt
>
> The second > will cause the line to be appended to the file rather than
> write a single line file.

Thanks for the reply.  I do not think this line is in error. It does
indeed write multiple lines to the file.  The second > would allow me to
append to the file during additional loops, if I had any.  Each of the
commands (ps, grep, tr and cut) all return the entire output as a single
input to the next level so it does indeed calculate totals.  They are just
way out of whack because each process reports it's total memory usage that
also includes shared libraries which every other process is using.

Here is a sample output:

 # ./memory_usage.bash oracle
oracle virtual memory usage is 657999784.
oracle real memory usage is 45185172.

Total oracle memory usage is 703184956.


 # free
             total       used       free     shared    buffers     cached
Mem:      32394788   27076656    5318132          0    2748624   16499256
-/+ buffers/cache:    7828776   24566012
Swap:     20265948     434284   19831664
mcidm4:/opt/will #




-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux