I want to implement top function for the web app, is it possible to get the output of
top command in non interactive shell.
top -b -n 1
-b : Batch mode operation Starts top in 'Batch mode', which could be useful for sending output from top to other programs or to a file. In this mode, top will not accept input and runs until the iterations limit you've set with the '-n' command-line option or until killed.