Useful Hardware commands

 
Thread Tools Search this Thread
Special Forums Hardware Useful Hardware commands
# 8  
Old 11-29-2011
I don't even have /etc/sysconfig... redhat is not the universe...

Something that does exist under all (modern) Linux is the special /sys/ folder. It's a virtual folder like /proc/ which holds no real files, but there's all sorts of information buried in there.

Code:
# Mac addresses for each network interface
for D in /sys/class/net/*
do
        [ "$D" = "/sys/class/net/lo" ] && continue
        [ "$D" = "/sys/class/net/sit0" ] && continue
        printf "%s\t%s\n" "${D}" "`cat ${D}/address`"
done

# Models of disk drives on the system
for D in /sys/class/block/sd[a-z] /sys/class/block/sr[0-9] /sys/class/block/hd[a-z]
do
        [ -e "$D" ] || continue
        printf "%s\t%s\n" $D "`cat "$D"/device/model`"
done

# 9  
Old 11-29-2011
for solaris i would add:
Code:
# prtdiag
# prtconf
# ipmitool

# 10  
Old 11-29-2011
For HP-UX:
Code:
sysinfo.sh

A gigantic Shell script from HP support. Outputs either text format or an html tree. Only uses commands available on your system. Finds out everything worth finding out about your hardware and software installation. Finds hardware error logs you never knew you had and picks up certain security holes.
Working your way through the script is an education.


For modern Windows - a handy summary from the Command Prompt:
Code:
systeminfo | more


Last edited by methyl; 11-29-2011 at 06:30 PM..
# 11  
Old 12-13-2011
Another Linux utility, probably not installed by default, but very useful:

Code:
sudo powertop

an interactive command which tells you about the performance of your system with respect to electrical power use. It makes fairly intelligent suggestions for reducing power use by suggesting kernel options and tweaks. It also shows a top-like list of processes and kernel drivers, ordered by how many wakeups they cause per second. Programs or drivers which poll for events instead of simply waiting will show as the power-wasters they are.

---------- Post updated 12-13-11 at 09:03 AM ---------- Previous update was 12-12-11 at 12:57 PM ----------

Another basic linux one, cat /proc/swaps
# 12  
Old 03-16-2012
Quote:
Originally Posted by CarloM
Another file that's sometimes useful (RedHat, but probably any Linux):
Code:
cat /etc/sysconfig/hwconf

What version of redhat do you have? I have fedora and I don't have that file.

Code:
$ ls -l /etc/sysconfig/
total 216
-rw-r--r--  1 root root    9 Jan  2 09:13 acpid
-rw-r--r--. 1 root root  403 Jul 20  2011 atd
-rw-r-----. 1 root root  647 Aug 15  2011 auditd
-rw-r--r--. 1 root root  368 Sep 12  2011 authconfig
drwxr-xr-x. 2 root root 4096 Jan  8 22:13 cbq
-rw-r--r--. 1 root root  486 May 30  2011 cgconfig
-rw-r--r--. 1 root root  950 May 30  2011 cgred.conf
-rw-rw-r--. 1 root root  199 Sep 12  2011 clock
drwxr-xr-x. 2 root root 4096 Oct 12 16:46 console
-rw-r--r--. 1 root root 2651 Feb  8  2011 cpuspeed
-rw-r--r--. 1 root root  110 Oct 25 16:39 crond
-rw-rw-r--. 1 root root   35 May 13  2011 desktop
-rw-r--r--. 1 root root   31 Jun 28  2011 dund
-rw-r--r--. 1 root root   17 Sep 12  2011 firstboot
-rw-r--r--. 1 root root   35 Feb  9  2011 gpsd
-rw-rw-r--. 1 root root   25 Sep 12  2011 grub
-rw-r--r--  1 root root  830 Feb 13 09:46 httpd
-rw-rw-r--. 1 root root   47 Sep 12  2011 i18n
-rw-r--r--. 1 root root 1070 Oct 12 16:46 init
-rw-------. 1 root root  416 May 13  2011 ip6tables
-rw-------. 1 root root 1753 Feb 14  2011 ip6tables-config
-rw-------. 1 root root  495 May 13  2011 ip6tables.old
-rw-------. 1 root root  420 Dec 21 05:54 iptables
-rw-------. 1 root root 1740 Feb 14  2011 iptables-config
-rw-------. 1 root root  493 May 13  2011 iptables.old
-rw-------. 1 root root  411 Dec 21 05:54 iptables.save
-rw-r--r--. 1 root root   58 Jul 15  2011 irda
-rw-r--r--. 1 root root  648 May  6  2011 irqbalance
-rw-rw-r--  1 root root  180 Mar  9 02:49 kernel
-rw-rw-r--. 1 root root   45 Sep 12  2011 keyboard
-rw-r--r--. 1 root root  204 Jun 17  2011 man-db
drwxr-xr-x. 2 root root 4096 Oct 12 16:46 modules
-rw-r--r--. 1 root root  634 Oct 12 16:46 netconsole
-rw-rw-r--. 1 root root   76 Oct 24 21:00 network
drwxr-xr-x. 4 root root 4096 Oct 12 16:46 networking
drwxr-xr-x. 2 root root 4096 Mar  2 18:47 network-scripts
-rw-r--r--. 1 root root 1737 Sep 14  2011 nfs
-rw-r--r--. 1 root root   45 May  6  2011 ntpd
-rw-r--r--. 1 root root  159 May  6  2011 ntpdate
-rw-r--r--. 1 root root   71 Jun 28  2011 pand
-rw-r--r--. 1 root root 1459 Apr  1  2011 prelink
-rw-r--r--  1 root root 2776 Jan 12 08:01 raid-check
-rw-r--r--. 1 root root   15 Feb  9  2011 rdisc
-rw-r--r--. 1 root root  659 Oct 12 16:46 readonly-root
-rw-r--r--  1 root root  200 Jan 27 07:56 rsyslog
-rw-r--r--. 1 root root  136 Apr 29  2011 sandbox
-rw-r--r--. 1 root root  553 Jul 26  2011 saslauthd
lrwxrwxrwx. 1 root root   17 May 13  2011 selinux -> ../selinux/config
-rw-r--r--. 1 root root   20 Oct 24 08:28 sendmail
-rw-r--r--. 1 root root  125 Oct 21 09:34 smartmontools
-rw-------. 1 root root   71 Sep 12  2011 system-config-firewall
-rw-------. 1 root root   74 May 13  2011 system-config-firewall.old
-rw-r--r--. 1 root root  304 Aug 23  2011 system-config-users
-rw-r--r--. 1 root root  644 Jul 27  2011 wpa_supplicant
-rw-r--r--. 1 root root  376 Apr 21  2011 xinetd

# 13  
Old 04-03-2012
Quote:
Originally Posted by cokedude
What version of redhat do you have? I have fedora and I don't have that file.
Might be a RHEL-only thing (5.4). Smilie
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

Hardware faulty, but which hardware?

Hi folk, I have this hardware faunty message, but dont know which hardware is this ? can you guide me ? --------------- ------------------------------------ -------------- --------- TIME EVENT-ID MSG-ID SEVERITY ---------------... (9 Replies)
Discussion started by: dehetoxic
9 Replies

2. AIX

HACMP: difference between 'cl' commands and 'cli' commands

Hi all, I'm new in this forum. I'm looking for the difference between the HACMP commands with the prefix "cl" and "cli". The first type are under /usr/es/sbin/cluster/sbin directory and the second are under /usr/es/sbin/cluster/cspoc directory. I know that the first are called HACMP for AIX... (0 Replies)
Discussion started by: peppix
0 Replies

3. AIX

New Hardware

Can someone help me with what I am guessing is a simple job for an AIX admin. However I am 100% HP-UX and not touched AIX before the start of this week. I am trying to connect an IBM Blade (JS22) to our HP Enterprise Tape Library. I have done all the SAN zoning and this appears to be happy... (5 Replies)
Discussion started by: Andyp2704
5 Replies

4. Solaris

commands hanging when querying hardware

Hi all Got another strange one. If I try to enquire about the hardware, the command hangs implying Ive got a hardware issue. So, if I execute :- iostat -en sysdef - ( stops at the devices part ) format cfgadm -al Anything that searches the devices, then the command hangs. ... (4 Replies)
Discussion started by: sbk1972
4 Replies

5. Shell Programming and Scripting

Can BASH execute commands on a remote server when the commands are embedded in shell

I want to log into a remote server transfer over a new config and then backup the existing config, replace with the new config. I am not sure if I can do this with BASH scripting. I have set up password less login by adding my public key to authorized_keys file, it works. I am a little... (1 Reply)
Discussion started by: bash_in_my_head
1 Replies

6. Programming

code that reads commands from the standard i/p and executes the commands

Hello all, i've written a small piece of code that will read commands from standard input and executes the commands. Its working fine and is execting the commands well. Accepting arguments too. e.g #mkdir <name of the directory> The problem is that its not letting me change the directory i.e... (4 Replies)
Discussion started by: Phrozen Smoke
4 Replies

7. AIX

AIX Hardware commands

Hi All, Needed commands to find Monitor , chassis & keyboard related information on AIX. Please please please help. Thanks VK (2 Replies)
Discussion started by: Veenak15
2 Replies

8. HP-UX

HPUX Hardware commands.

HI ALL, I am new tp HPUX and i am looking for command that will retive me the following information on HPUX: Chassis Name & Serial Number: Monitor Name BIOS Name EthernetPort Name IPEndpoint Name PointingDevice Name Keyboard NetworkPrinter Name LocalPrinter (5 Replies)
Discussion started by: Veenak15
5 Replies

9. AIX

AIX and SUN unix commands for hardware monitoring

Hello again, I would like to know if the following commands: diag, errpt, lscfg, lspv, lsvg, lsps, lslv for AIX and prtdiag, psrinfo, sysdef for SUN are native to these systems or if they are in fact scripts that are added after the unix installation. Thank you in advance. Have a nice day (4 Replies)
Discussion started by: VeroL
4 Replies

10. UNIX Desktop Questions & Answers

hardware 3d

How do I check my system to see if the graphics are using hardware 3d suport or not. I have a TNT2 on RH 7.1 kernel 2.4.9-?(can't remember off top of my head)I'm running all the latest updates from RH. Also I now have a dvd drive and I am trying to find a player that will play all movies and not... (1 Reply)
Discussion started by: MaxCat
1 Replies
Login or Register to Ask a Question