Operating System - HP-UX
1771308 Members
2140 Online
109005 Solutions
New Discussion

Re: top command output not running in html page

 
Laurent Menase
Honored Contributor

Re: top command output not running in html page

Are you sure the cgi bin as access right on current dir? try to put the file on /tmp

echo "<pre> $(top -s 1 -d 1 -f /tmp/top-file_$$ >/tmp/top-fileout$$ 2>&1; cat /tmp/top-file_$$ ; rm -f /tmp/top-fileout$$  /tmp/top-file_$$ ) </pre>"

Are you sure your web server don't timeout?

may be try

echo "<pre> $(top -s 1 -d 1 -f /tmp/top-file_$$ >/tmp/top-fileout$$ 2>&1; cat /tmp/top-file_$$ ; rm -f /tmp/top-fileout$$  /tmp/top-file_$$ ) </pre>"