Operating System - HP-UX
1756735 Members
2732 Online
108852 Solutions
New Discussion

top command output not runnibg 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>"