Is it possible to export output from apachetop to file? Something like this: “apachetop > file”, but because apachetop is running “forever”, so this command is also running forever. I just need to obtain actual output from this program and handle it in my GTK# application.
Every answer will be very appreciated.
Matej.
Is it possible to export output from apachetop to file? Something like this: apachetop
Share
This might work:
{ apachetop > file 2>&1 & sleep 1; kill $! ; }
but no guarantees 🙂
Another way using linux is to find out the /dev/vcsN device that is being used when running the program and reading from that file directly. It contains a copy of the screen data for a given VT; I’m not sure if there is a applicable device for a pty.