HELP shell scripting!!

Status
Not open for further replies.

mediator

Technomancer
I want to develop a shell script which dispalys system information like CPU speed,RAm,processor type etc.
So far i have been able to knowonly one variable -> $HOSTNAME
If anybody know more shell variables like thisplease post here or post complete shell script!
 

GNUrag

FooBar Guy
Not everything is available through shell variables. You must look into your /proc filesystem to get more info about your harware.

Here's your shell script: hostinfo.sh
Code:
#!/bin/sh
# File hostinfo.sh (C) Anurag.

echo **** Host Info ****
echo -e "\n--- CPU Info ---"
cat /proc/cpuinfo | grep model
cat /proc/cpuinfo | grep MHz
echo -e "\n--- Memory Info ---"
cat /proc/meminfo | grep MemTotal
echo -e "\n--- USB Hubs ---"
lspci | grep USB
echo -e "\n--- Graphics Hardware ---"
lspci | grep VGA
echo -e "\n--- System Uptime ---"
uptime
echo -e "\n-- Kernel Version ---"
cat /proc/version
 
Status
Not open for further replies.
Top Bottom