Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
12-12-2005, 07:09 PM
|
#1
|
LQ Newbie
Registered: Nov 2005
Posts: 5
Rep:
|
how to write utilities
How would i write a utility containing the following information CPU, memory, version of the Linux kernel, hardware and boot information, kernel modules, disk usage, free disk space, processes, %CPU usage, %MEM usage, uptime, who's logged in, etc.?
|
|
|
12-13-2005, 12:41 PM
|
#2
|
LQ Guru
Registered: Apr 2003
Location: ~
Distribution: Ubuntu, FreeBSD, Solaris, DSL
Posts: 5,337
Rep:
|
Quote:
Originally Posted by ecampos02
How would i write a utility containing the following information CPU, memory, version of the Linux kernel, hardware and boot information, kernel modules, disk usage, free disk space, processes, %CPU usage, %MEM usage, uptime, who's logged in, etc.?
|
Wow, that's a lot of work. You are better of using one of the many applications that does it already. Gkrellm is very popular:
http://members.dslextreme.com/users/...m/gkrellm.html
it accepts themes and is quite useful, with a good amount of eye candy
Torsmo:
http://torsmo.sourceforge.net/
My personal favorite. Instead of running on your desktop, it runs on the root screen, kinda like a background. The application is noticeable smaller then gkrellm, so you might check out the source code for this.
Root-tail:
http://www.goof.com/pcg/marc/root-tail.html
Another simple application, similar to torsmo, but instead of display CPU, HD, RAM etc, if shows your log messages. Also worthy checking out.
Now, if you want to write things like this from scratch, you will need loads of good understanding of programming and especially how Linux works.
Good luck!
|
|
|
12-13-2005, 04:08 PM
|
#3
|
Senior Member
Registered: Nov 2002
Location: CA
Distribution: redhat 7.3
Posts: 1,440
Rep:
|
You know how to find out the output from command line right? If so, just put that in a bash script and format it the way you want it. It's not too hard...just tedious work that is involved.
-twantrd
|
|
|
All times are GMT -5. The time now is 06:18 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|