Getting HW info on redhat


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Getting HW info on redhat
# 1  
Old 07-10-2008
Getting HW info on redhat

Hello Everybody,

I need a script to get the hardware info for redhat ( CPU-Memory-Disks-packages-platform)

here what I've come up with:

Code:
#!/usr/bin/sh

rm  /tmp/output
echo "/n PCI info /n" >  /tmp/output

lspci >> /tmp/output

echo "/n Memory info /n" >>  /tmp/output /tmp/output
dmesg | grep -i memory >>  /tmp/output


echo "/n CPU info /n" >> /tmp/output
cat /proc/cpuinfo  /n" >>  /tmp/output

echo " HDD info /n" >>  /tmp/output
fdisk -l >>  /tmp/output
echo "/n " >>  /tmp/output
fdisk -l /dev/sdb* >> /tmp/output
echo "/n" >>  /tmp/output
fdisk -l /dev/hda* >> /tmp/output

echo "/n  Package info /n" >>  /tmp/output
rpm -qa >> /tmp/output

echo "/n Relese info /n" >> /tmp/output
cat /etc/*-release >> /tmp/output

echo "/n platform info /n" >> /tmp/output
uname -a >> /tmp/output

please advise

Thanks in advance
Aladdin
# 2  
Old 07-10-2008
You might also look into the output of "hwinfo" and if you use LVM it's commands like vgdisplay, pvdisplay, etc.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Red Hat

Redhat clustering clustat not showing info

Having an issue with clustat not displaying the rgmanager info eventhu all the of the cman started successfully. No fencing errors. all of the cluster.conf are the same on all serers ..etc. However when i run the clustat i only see this: Cluster Status for RESTON-LSMS @ Mon Aug 31 15:13:16 2015... (4 Replies)
Discussion started by: mrn6430
4 Replies

2. UNIX for Advanced & Expert Users

Sort command results are different in Redhat 4 vs Redhat 5

Hi, I am having a text file with the following contents ########### File1 ########### some page1.txt text page.txt When I sort this file on Red Hat 5, then I get the following output ########### File1 ########### page1.txt page.txt some (3 Replies)
Discussion started by: sarbjit
3 Replies

3. Shell Programming and Scripting

Getting LV Info

I have this working ksh, and it returns like below: LOGICAL VOLUME: prod_2048_005 VOLUME GROUP: prod1vg TYPE: raw WRITE VERIFY: off PHYSICAL VOLUME: hdisk108 VOLUME GROUP: prod1vg TOTAL PPs: 1023 (130944 megabytes) VG DESCRIPTORS: 1 USED PPs: 904 (115712 megabytes) MAX REQUEST: 1 megabyte... (1 Reply)
Discussion started by: Daniel Gate
1 Replies

4. UNIX for Dummies Questions & Answers

Some Info.

Hiya all ... i am a newbie to UNIX, Just want to knwo what this command does: /sbin/ifconfig eth0 | grep 'inet addr:' | cut -d: -f2 | awk '{ print $1}' I think, 'grep shows the line with 'inet addr' (which is the 2nd line, displaying the IP Address, Broadcast Address and Subnet Mask) ... Is... (8 Replies)
Discussion started by: ad4m88
8 Replies

5. UNIX for Dummies Questions & Answers

User Info

How could I get the details about a user logged in a Unix system? ( WHat tasks did he perform or if he had changed any file or not)? Please answer my question. (1 Reply)
Discussion started by: s_dhar
1 Replies

6. Shell Programming and Scripting

Need Info

Hi, I'm a oracle DBA with little knowledge of Unix. I wanted to write some shell scripts which will be helpful for DBA's regular activity. As i'm a new to oracle with unix can any plese tell me what are all the activities can be done throgh Unix Shell Scripts also suggest me how to learn... (1 Reply)
Discussion started by: msgobinathan
1 Replies

7. Shell Programming and Scripting

Telnet and get info

Hello all, probably this is a very stupid question but I'm a beginner in the arts of scripting... :confused: I'm trying to do a script that logs in to several equipments, switchs etc, and make them show their version and save all the output to a file. I managed to do the login,... (6 Replies)
Discussion started by: pmpx
6 Replies

8. Red Hat

How get more LUN info

Hello, I'm trying to help a guy out on a VMWARE server, running what looks like a cut down version of redhat? 2.4.9-vmnix2 ... Bascially the box serves vm clients via allocating a LUN from a SAN.. to cut a long story short, I need to find out which SAN the luns are comming from (could be 1... (0 Replies)
Discussion started by: itsupplies
0 Replies

9. UNIX for Dummies Questions & Answers

SU info

from the man page of su: EXAMPLES Example 1: Becoming User bin While Retaining Your Previously Exported Environment To become user bin while retaining your previously exported environment, execute: example% su bin Example 2: Becoming User bin and ... (4 Replies)
Discussion started by: afflack
4 Replies

10. UNIX for Dummies Questions & Answers

ps -ef not showing all info

Hi there, How can I expand the command filed sizing when using a ps command. With diretories and script names and parameters being set I'm not getting some of the information that I need (at the end of the command line). I'm using HP_UX 11i. Cheers, Neil (2 Replies)
Discussion started by: nhatch
2 Replies
Login or Register to Ask a Question