Looking for a 'top' like library

Looking for a 'top' like library

Post by Stefan Brozinsk » Sat, 01 Mar 2003 00:40:57



Hello world,

I am looking for a library that provides the same information 'top' does .
Is there any 'libtop.so' out there?

TIA
Stefan (using Solaris 8)

 
 
 

Looking for a 'top' like library

Post by Wojtek Walcza » Sat, 01 Mar 2003 01:08:20


Dnia Thu, 27 Feb 2003 16:40:57 +0100, Stefan Brozinski napisa3(a):
Quote:> I am looking for a library that provides the same information 'top' does .
> Is there any 'libtop.so' out there?

Well, top on proc-fs boxes is using libproc library, you can try to use
it. For example - here's a function print_uptime() from libproc library:

--- c.c ---
int main(void){
   print_uptime();
   return 0;

Quote:}

-----------

$ gcc c.c -lproc
$ ./a.out
  5:02pm  up  3:03, 10 users,  load average: 0.03, 0.15, 0.08
$

Of course top uses ncurses, so if you want to have self-changing
output you need to implement it yourself.
Here's a code similar to ps, but a lot simpler:
           <http://gminick.linuxsecurity.pl/tools/fpees.c>

HTH in any way,
Wojtek.

--
[ ] gminick (at) underground.org.pl  http://gminick.linuxsecurity.pl/ [ ]
[ "Po prostu lubie poranna samotnosc, bo wtedy kawa smakuje najlepiej." ]

 
 
 

Looking for a 'top' like library

Post by Bjorn Rees » Sat, 01 Mar 2003 04:56:34



> I am looking for a library that provides the same information 'top' does .
> Is there any 'libtop.so' out there?

You could try libgtop, although I do not know if it still is being
maintained.

  http://www.gnome.org/softwaremap/projects/libgtop/

You should be aware of the licensing conditions.

 
 
 

1. Looking for 'top' precompiled binary (3.2 2 i386)

Unfortunately my machine don't have a C-compiler neither the system-load
monitor program 'top'. I wonder if anyone might have this precompiled for my
system ? If so; can you please send it to me ?

Thanks in advance !

--------------------------------
 Sverre Larsson * IRC: Thalamus


2. qt >= 1.42 (headers and libraries) not found

3. Looking for 'top' like print monitor

4. Dot in PATH?

5. Looking for 'top' program to check RAM

6. General tips for new installs, any version, never used linux before

7. Looking for something like 'top' for X

8. DMA timeouts on Promise 20267 IDE card

9. Limiting 'w', 'top' and 'ps'

10. Looking for 'top' utility

11. Another 'top' (33k) -- looking for feedback

12. looking for library 'libc.so.4'

13. Looking for 'search' library source