[Libwebsockets] linux Collect top command output

Life Life sadlife1990 at gmail.com
Tue Sep 16 09:30:15 CEST 2014


Thanks for help.

2014-09-15 15:45 GMT+03:00 Andy Green <andy at warmcat.com>:

>
>
> On 15 September 2014 05:35:35 GMT-07:00, Life Life <sadlife1990 at gmail.com>
> wrote:
> >Thanks. How to catch stdout from top command ?
>
> https://www.google.com.tw/search?q=redirect+stdout+system
>
> -Andy
>
> >Best Regards.
> >
> >2014-09-14 20:00 GMT+03:00 Andy Green <andy at warmcat.com>:
> >
> >>
> >>
> >> On 14 September 2014 08:45:56 GMT-07:00, Life Life
> ><sadlife1990 at gmail.com>
> >> wrote:
> >> >Hello,
> >> >
> >> >I'm trying libwebsockets to collect linux top command outputsuch as
> >cpu
> >> >and
> >> >memory usage to show small website. is it possible to libwebsockets?
> >>
> >> Sure... if you literally want to run top you can redirect stdout from
> >it
> >> and send the results down an established websocket link.
> >>
> >> Otherwise you can walk /proc and report stats from that directly,
> >without
> >> spawning top.
> >>
> >> -Andy
> >>
> >> >
> >> >Thanks.
> >> >
> >> >
> >>
> >>------------------------------------------------------------------------
> >> >
> >> >_______________________________________________
> >> >Libwebsockets mailing list
> >> >Libwebsockets at ml.libwebsockets.org
> >> >http://ml.libwebsockets.org/mailman/listinfo/libwebsockets
> >>
> >>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://libwebsockets.org/pipermail/libwebsockets/attachments/20140916/392581a9/attachment-0001.html>


More information about the Libwebsockets mailing list