VectorLinux

Please login or register.

Login with username, password and session length
Advanced search  

News:

Visit our home page for VL info. For support and documentation, visit the Vector Linux Knowledge Center or search the Knowledge Center and this Forum using the search box above.

Author Topic: Script to find out memory usage  (Read 8903 times)

macondo

  • Member
  • *
  • Posts: 57
Script to find out memory usage
« on: July 14, 2012, 08:55:38 am »

Here's a script i got from MeanDean in the forum.debian.net forum
http://forums.debian.net/viewtopic.php?f=16&t=54688&p=316082&hilit=memory+usage#p316082

open a terminal and use the following commands

Code: [Select]
    wget http://www.pixelbeat.org/scripts/ps_mem.py
    su
    mv ps_mem.py /usr/local/sbin/
    chmod 755 /usr/local/sbin/ps_mem.py

Code: [Select]
# ps_mem.py

Here is mine:

Code: [Select]
root:# ps_mem.py
 Private  +   Shared  =  RAM used       Program

 72.0 KiB +  24.0 KiB =  96.0 KiB       mingetty
 88.0 KiB +  19.5 KiB = 107.5 KiB       klogd
104.0 KiB +  41.0 KiB = 145.0 KiB       avahi-dnsconfd
124.0 KiB +  23.5 KiB = 147.5 KiB       gpm
128.0 KiB +  33.0 KiB = 161.0 KiB       syslogd
128.0 KiB +  42.5 KiB = 170.5 KiB       crond
128.0 KiB +  54.5 KiB = 182.5 KiB       acpid
172.0 KiB +  24.5 KiB = 196.5 KiB       dhcpcd
148.0 KiB +  65.0 KiB = 213.0 KiB       xinit
328.0 KiB +   2.5 KiB = 330.5 KiB       init
208.0 KiB + 125.0 KiB = 333.0 KiB       unclutter
276.0 KiB +  74.0 KiB = 350.0 KiB       dbus-launch
356.0 KiB + 168.0 KiB = 524.0 KiB       startx
456.0 KiB + 382.5 KiB = 838.5 KiB       dbus-daemon (2)
500.0 KiB + 357.5 KiB = 857.5 KiB       avahi-daemon (2)
312.0 KiB + 692.0 KiB =   1.0 MiB       udevd (3)
600.0 KiB + 482.0 KiB =   1.1 MiB       gconfd-2
852.0 KiB + 512.0 KiB =   1.3 MiB       jwm
728.0 KiB + 691.5 KiB =   1.4 MiB       polkitd
  1.2 MiB + 534.5 KiB =   1.7 MiB       console-kit-daemon
  1.6 MiB + 493.5 KiB =   2.1 MiB       xterm
  1.5 MiB + 668.5 KiB =   2.2 MiB       bash (3)
  4.4 MiB + 868.0 KiB =   5.3 MiB       wicd-monitor
  4.9 MiB + 487.0 KiB =   5.4 MiB       wicd
  9.5 MiB + 477.5 KiB =   9.9 MiB       Xorg
 68.3 MiB +   1.8 MiB =  70.1 MiB       firefox
---------------------------------
                        105.9 MiB
=================================

Logged
VL 7.0 Light - Barebones Install - Kernel 3.0.17
Debian Testing - Minimal Install - kernel 3.4.0-6.dmz.1-liquorix-686
Desktop: Atom Processor || 1 GB RAM || 500 GB HD

macondo

  • Member
  • *
  • Posts: 57
Re: Script to find out memory usage
« Reply #2 on: July 16, 2012, 06:04:16 am »

You can find this info in so many different ways, it's a matter of choice. Personally i don't like conky and its configuration on my desktop. Here i open a terminal and voilĂ !
Logged
VL 7.0 Light - Barebones Install - Kernel 3.0.17
Debian Testing - Minimal Install - kernel 3.4.0-6.dmz.1-liquorix-686
Desktop: Atom Processor || 1 GB RAM || 500 GB HD

hata_ph

  • Packager
  • Vectorian
  • ****
  • Posts: 3261
  • -- Just being myself --
Re: Script to find out memory usage
« Reply #3 on: July 16, 2012, 06:22:21 am »

ok :)
Logged

sledgehammer

  • Vectorian
  • ****
  • Posts: 1459
Re: Script to find out memory usage
« Reply #4 on: July 16, 2012, 08:00:08 am »

macando,

good tip.  Trick will be to remember ps_mem.py.

Logged
VL7.0 xfce4 Samsung RF511

MarkGrieveson

  • Vectorian
  • ****
  • Posts: 531
Re: Script to find out memory usage
« Reply #5 on: July 16, 2012, 11:26:39 am »

Thanks, that's a good script.  Seems firefox is the biggest memory hog I've got going at the moment.
Logged
I am using VL7.0 standard with XFCE

macondo

  • Member
  • *
  • Posts: 57
Re: Script to find out memory usage
« Reply #6 on: July 16, 2012, 06:35:24 pm »

A light browser i like is Vimprobable2. It's like Midori with Vimperator :)
IceWM in my box: 2.3 MB ram
JWM uses 1.3 MB ram
Ratpoison uses 1.0 MB ram
Midori uses 56 MB ram
« Last Edit: July 16, 2012, 06:55:41 pm by macondo »
Logged
VL 7.0 Light - Barebones Install - Kernel 3.0.17
Debian Testing - Minimal Install - kernel 3.4.0-6.dmz.1-liquorix-686
Desktop: Atom Processor || 1 GB RAM || 500 GB HD

MarkGrieveson

  • Vectorian
  • ****
  • Posts: 531
Re: Script to find out memory usage
« Reply #7 on: July 16, 2012, 06:58:48 pm »

I never did get the hang of ratpoison when I tried it.  But I loved Ion3.  Alas, its maker Tuomov became disenchanted with various things, and stopped developing it.

Regarding Ion3, I just discovered that a newer fork of it has been developed, called Notion.  And, vpackager was able to make a package out of the source, so I'm going to try this.

[..]

Well, I did install it, but the desktop manager does not show it as a choice. 
« Last Edit: July 16, 2012, 07:56:46 pm by MarkGrieveson »
Logged
I am using VL7.0 standard with XFCE

macondo

  • Member
  • *
  • Posts: 57
Re: Script to find out memory usage
« Reply #8 on: July 17, 2012, 06:40:55 am »

Quote
Well, I did install it, but the desktop manager does not show it as a choice. 

If you're talking about GDM, uninstall it, edit /etc/inittab and change the runlevel to 3, reboot, and when you come back put it in your .xinitrc and enter the X system with 'startx' and voilĂ ! you're in Notion :D
Logged
VL 7.0 Light - Barebones Install - Kernel 3.0.17
Debian Testing - Minimal Install - kernel 3.4.0-6.dmz.1-liquorix-686
Desktop: Atom Processor || 1 GB RAM || 500 GB HD

MarkGrieveson

  • Vectorian
  • ****
  • Posts: 531
Re: Script to find out memory usage
« Reply #9 on: September 20, 2013, 09:12:59 pm »

~
« Last Edit: September 20, 2013, 09:14:46 pm by MarkGrieveson »
Logged
I am using VL7.0 standard with XFCE