-
Notifications
You must be signed in to change notification settings - Fork 0
/
sysinfo.sh
executable file
·53 lines (39 loc) · 1023 Bytes
/
sysinfo.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#!/bin/bash
# Script to get the following information on a Linux Machine
# -> uname -a
# -> interrupts
# -> devices
# -> cpuinfo
# -> modules
# -> meminfo
# -> kernel* rpms
# -> directories in /usr/src
# -> directories in /lib/modules
LOG=sysinfo.log
>$LOG
uname -a >> $LOG
echo "****{ Interrupts }****" >> $LOG
cat /proc/interrupts >> $LOG
echo " " >> $LOG
echo "****{ Devices }****" >> $LOG
cat /proc/devices >> $LOG
echo " " >> $LOG
echo "****{ CPU Info }****" >> $LOG
cat /proc/cpuinfo >> $LOG
echo " " >> $LOG
echo "****{ Module Info }****" >> $LOG
cat /proc/modules >> $LOG
echo " " >> $LOG
echo "****{ Module Info }****" >> $LOG
cat /proc/meminfo >> $LOG
echo " " >> $LOG
echo "****{ Kernel Pkg }****" >> $LOG
rpm -qa | grep kernel >> $LOG
echo " " >> $LOG
echo "****{ /usr/src }***" >> $LOG
ls -l /usr/src >> $LOG
echo " " >> $LOG
echo "****{ /lib/modules }****" >> $LOG
ls -l /lib/modules/* >> $LOG
egrep "pci_read|pci_write" /proc/ksyms >> $LOG
echo "Done! Logged information in <sysinfo.log> file"