mem leak check

ps gv [pid] | head -2
sh as: #! /bin/sh while [ 1 -ne 6 ]; do pid=`ps -ef | grep -v "grep" | grep "trans_gzdy" | cut -c10-17` ps gv $pid | head -2 sleep 1 done check changes of RSS.
Sample Output
PID    TTY STAT  TIME PGIN  SIZE   RSS   LIM  TSIZ   TRS %CPU %MEM COMMAND
 651368      - A     0:00    1  3360  3860 327680   255   500  0.0  0.0 trans_gz

-1
By: ren
2009-02-12 05:04:55

These Might Interest You

  • This is useful for use in scripts. Note that this will leak your password to ps, so this shouldn't be used on shared machines. Use key files for this


    0
    su -c "truecrypt --non-interactive truecrypt-file cryptshare -p PASSWORD"
    tatwright · 2009-05-22 21:11:29 0
  • Sometimes "ls" is just too slow, especially if you're having problems with terminal scroll speed, or if you're a speed freak. In these situations, do an echo * in the current directory to immediately see the directory listing. Do an echo * | tr ' ' '\n' if you want a column. Do an alias ls='echo *' if you want to achieve higher echelons of speed and wonder. Note that echo * is also useful on systems that are so low in memory that "ls" itself is failing - perhaps due to a memory leak that you're trying to debug.


    -5
    echo *
    kFiddle · 2009-04-17 21:40:58 5
  • Tunneling an SSH session through TOR for anonymity. Using openbsd's netcat. Tested on Ubuntu 14.04 This also works with any proxy type: http, socks4 and socks5 For http proxy, replace -X 5 with -X connect For socks4 proxy, replace -X 5 with -X 4 (DNS leak may occur) Proxy host defined after -x Replace -x localhost:9050 with proxy server of your choice


    0
    ssh -o ProxyCommand="nc -X 5 -x localhost:9050 %h %p" username@remote_host
    unixmonkey77071 · 2014-06-09 08:54:58 0
  • Not everyone reads manpages. Aliasing this command will help with the task of doing audits with RKhunter. It will check for the latest version, update the definitions and then run a check on the system. Hint: alias that in your .bashrc to make life for your fingers easier.


    2
    rkhunter --versioncheck --update --propupd --check
    vxbinaca · 2009-12-15 00:23:45 1

What Others Think

watch -n1 "ps -C trans_gzdy -orss="
pixelbeat · 488 weeks and 3 days ago

What do you think?

Any thoughts on this command? Does it work on your machine? Can you do the same thing with only 14 characters?

You must be signed in to comment.

What's this?

commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.

Share Your Commands



Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.

» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10

Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for: