Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Am getting the real-time memory stats from vmstat command. I did this using following steps:

$nohup vmstat 60 > vmstatrecord.app &

the command executes in background and writes the log to the file vmstatrecord.app. When i see use the command

$ps -A | grep stat

I could see the vmstat running in the background and i could also access the log using tail command as:

$tail -f vmstatrecord.app

the file updates every 60sec interval.

Now my question is
1. process continues to write to the file so what will happen if i leave for days ?

If the process writes the file forever am afraid that the file size might grow too large

  1. If my assumption is correct and my steps are inefficient. Is there any alternatives to achieve what am trying to achieve from my above steps ?

Already Asked it Here

share|improve this question
why not use sysstat(sar)? –  c4f4t0r Mar 15 '14 at 9:13
I would also suggest ot use dedicated software like atop, sysstat, mrtg(snmp), or proprietary solutions. –  Kwaio Mar 15 '14 at 10:48

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.