-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathSystem_report.sh
More file actions
executable file
·416 lines (373 loc) · 5.59 KB
/
System_report.sh
File metadata and controls
executable file
·416 lines (373 loc) · 5.59 KB
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
#!/bin/bash
# Description: Linux System Information Report in HTML format
# Version 2.0
# Useage: sysreport » /var/www/html/report.html
# License: BSD
# Author: Greg Ippolito
cat «« HEAD
«HTML»
«HEAD»«TITLE»System Report«/TITLE»«/HEAD»
«BODY bgcolor="#c0c0c0" text="#000000"»
«HR size=5»
«P»
«H1»System Report for "
HEAD
echo `hostname`
cat «« BODY1
"«/H1»
«P»
«HR size=5»
«P»
BODY1
cat «« HOSTNAME
«H3»OS System Configuration:«/H3»
«B»hostname: «/B»
HOSTNAME
/bin/hostname
cat «« RELEASE
«P»
«B»OS Release: «/B»
RELEASE
/bin/cat /etc/*-release
cat «« HOSTID
«P»
«B»hostid: «/B»
HOSTID
/usr/bin/hostid
cat «« UNAMEO
«P»
«B»Kernel OS: «/B»
UNAMEO
uname --operating-system
cat «« UNAMER
«P»
«B»Kernel release: «/B»
UNAMER
uname --kernel-release
cat «« UNAMEV
«P»
«B»Kernel version: «/B»
UNAMEV
uname --kernel-version
cat «« UNAMEK
«P»
«B»Harware Platform: «/B»
UNAMEK
uname --hardware-platform
cat «« UNAMEPM
«P»
«B»Processor Architecture: «/B»
UNAMEPM
uname --processor
cat «« CHKCONFIG
«P»
«B»System services: (chkconfig)«/B»
«DL»«DD»
«SMALL»
«PRE»
CHKCONFIG
/sbin/chkconfig --list|grep on
cat «« CHKCONFIGEND
«/PRE»
«/SMALL»
«/DL»
«P»
CHKCONFIGEND
cat «« CRONTAB
«P»
«B»File: «TT»/etc/crontab«/TT»«/B»
«DL»«DD»
«SMALL»
«PRE»
CRONTAB
cat /etc/crontab
cat «« CRONTABEND
«/PRE»
«/SMALL»
«/DL»
«P»
CRONTABEND
echo "«P»«HR»«P»"
echo "«H3»Network Configuration:«/H3»"
cat «« HOSTS
«P»
«B»File: «TT»/etc/hosts«/TT»: «/B»
«DL»«DD»
«SMALL»
«PRE»
HOSTS
cat /etc/hosts
cat «« HOSTSEND
«/PRE»
«/SMALL»
«/DL»
«P»
HOSTSEND
cat «« SWITCH
«B»File: «TT»/etc/nsswitch.conf«/TT»: «/B»
«DL»«DD»
«SMALL»
«PRE»
SWITCH
cat /etc/nsswitch.conf
cat «« SWITCHEND
«/PRE»
«/SMALL»
«/DL»
«P»
SWITCHEND
cat «« RESOLV
«B»File: «TT»/etc/resolv.conf«/TT»: «/B»
«DL»«DD»
«SMALL»
«PRE»
RESOLV
cat /etc/resolv.conf
cat «« RESOLVEND
«/PRE»
«/SMALL»
«/DL»
«P»
RESOLVEND
cat «« IFCONFIG
«B»ifconfig: «/B»
«DL»«DD»
«SMALL»
«PRE»
IFCONFIG
/sbin/ifconfig
cat «« IFCONFIGEND
«/PRE»
«/SMALL»
«/DL»
«P»
IFCONFIGEND
cat «« ROUTE
«B»/sbin/route: «/B»
«DL»«DD»
«SMALL»
«PRE»
ROUTE
/sbin/route
cat «« ROUTEEND
«/PRE»
«/SMALL»
«/DL»
«P»
ROUTEEND
if [[ -r /etc/sysconfig/network ]];
then
cat «« IFCFGN
«B»Network Configuration File: «TT»/etc/sysconfig/network«/TT»: «/B»
«DL»«DD»
«SMALL»
«PRE»
IFCFGN
cat /etc/sysconfig/network
cat «« IFCFGENDN
«/PRE»
«/SMALL»
«/DL»
«P»
IFCFGENDN
fi
cat «« IFCFG
«B»Files «TT»/etc/sysconfig/network-scripts/ifcfg-eth*«/TT»: «/B»
«DL»«DD»
«SMALL»
«PRE»
IFCFG
cat /etc/sysconfig/network-scripts/ifcfg-eth*
cat «« IFCFGEND
«/PRE»
«/SMALL»
«/DL»
«P»
IFCFGEND
echo "«P»«HR»«P»"
if [[ -r /etc/mail/local-host-names || -r /etc/sendmail.cw || -r /etc/aliases || -r /etc/mail/virtusertable ]];
then
echo "«H3»Mail Server Configuration:«/H3»"
if [[ -r /etc/mail/local-host-names ]];
then
# Redhat 7.1 - Fedora Core X
cat «« SENMAILCFGN2
«B»Mail Hosts File: «TT»/etc/mail/local-host-names«/TT»: «/B»
«DL»«DD»
«SMALL»
«PRE»
SENMAILCFGN2
cat /etc/mail/local-host-names
cat «« SENMAILCFGN2
«/PRE»
«/SMALL»
«/DL»
«P»
SENMAILCFGN2
elif [[ -r /etc/sendmail.cw ]];
then
# Redhat 6.x
cat «« SENMAILCFGN
«B»Mail Hosts File: «TT»/etc/sendmail.cw«/TT»: «/B»
«DL»«DD»
«SMALL»
«PRE»
SENMAILCFGN
cat /etc/sendmail.cw
cat «« SENMAILCFGN
«/PRE»
«/SMALL»
«/DL»
«P»
SENMAILCFGN
fi
if [[ -r /etc/mail/virtusertable ]];
then
cat «« SENMAILCFGV
«B»Sendmail Virtual Table File: «TT»/etc/mail/virtusertable«/TT»: «/B»
«DL»«DD»
«SMALL»
«PRE»
SENMAILCFGV
cat /etc/mail/virtusertable
cat «« SENMAILCFGV
«/PRE»
«/SMALL»
«/DL»
«P»
SENMAILCFGV
fi
if [[ -r /etc/aliases ]];
then
cat «« SENMAILCFGN
«B»eMail Aliases File: «TT»/etc/aliases«/TT»: «/B»
«DL»«DD»
«SMALL»
«PRE»
SENMAILCFGN
cat /etc/aliases
cat «« SENMAILCFGN
«/PRE»
«/SMALL»
«/DL»
«P»
SENMAILCFGN
fi
fi
echo "«P»«HR»«P»"
cat «« DF
«H3»Storage:«/H3»
«B»df -k: «/B»
«DL»«DD»
«SMALL»
«PRE»
DF
df -k
cat «« DFEND
«/PRE»
«/SMALL»
«/DL»
«P»
DFEND
cat «« FDISK
«B»Disk Partitions: «TT»/sbin/fdisk -l«/TT»:«/B»
«DL»«DD»
«SMALL»
«PRE»
FDISK
/sbin/fdisk -l
cat «« FDISKEND
«/PRE»
«/SMALL»
«/DL»
«P»
FDISKEND
cat «« FSTAB
«B»File: «TT»/etc/fstab«/TT»: «/B»
«DL»«DD»
«SMALL»
«PRE»
FSTAB
cat /etc/fstab
cat «« FSTABEND
«/PRE»
«/SMALL»
«/DL»
FSTABEND
echo "«P»«HR»«P»"
cat «« HARDWARE
«H3»Hardware Configuration:«/H3»
«B»CPU info: «/B»
«DL»«DD»
«SMALL»
«PRE»
HARDWARE
cat /proc/cpuinfo
cat «« SWAP
«/PRE»
«/SMALL»
«/DL»
«P»
«B»Total Swap Memory: «/B»
«DL»«DD»
SWAP
grep SwapTotal: /proc/meminfo
cat «« MEM
«/DL»
«P»
«B»System Memory: «/B»
«DL»«DD»
MEM
grep MemTotal /proc/meminfo
cat «« MEMEND
«/DL»
«P»
MEMEND
cat «« PCI
«B»/sbin/lspci: «/B»
«DL»«DD»
«SMALL»
«PRE»
PCI
/sbin/lspci
cat «« PCIEND
«/PRE»
«/SMALL»
«/DL»
«P»
PCIEND
DEVINFO
cat «« DEV
«B»/lsdev:«/B»
«DL»«DD»
«SMALL»
«PRE»
DEV
lsdev
cat «« DEVINFO
«/PRE»
«/SMALL»
«/DL»
«p»
DEVINFO
cat «« HWCONF
«B»Devices:«/B»
«DL»«DD»
«B»File: «TT»/etc/sysconfig/hwconf«/TT»«/B»
«SMALL»
«PRE»
HWCONF
cat /etc/sysconfig/hwconf
cat «« HWCONFEND
«/PRE»
«/SMALL»
«/DL»
«P»
HWCONFEND
cat «« BODYEND
«P»
«HR»
«P»
«/BODY»
«/HTML»
BODYEND