-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy path1-run-this-first.sh
More file actions
executable file
·54 lines (51 loc) · 1.97 KB
/
1-run-this-first.sh
File metadata and controls
executable file
·54 lines (51 loc) · 1.97 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
#!/bin/bash
# Author: Zakir Shaikh
# github.com/searchzakir
# linkedin.com/in/searchzakir
logger -s "running script ($0) by user (`whoami`) and pid = ($$)"
#
# I normally run this script first on every server whenever I login manually on that server or instance for any further work or for debugging purpose
# This script considers that a postfix mail server is actually running where this script is gonna run
# For web servers, things are different & thus so are respective commands
#
echo "========================================================================================"
echo "whatismyIP.sh:"
echo ""
sh /root/whatismyIP.sh
echo "========================================================================================"
echo "date:"
echo ""
date
echo "========================================================================================"
echo "w:"
echo ""
w
echo "========================================================================================"
echo "netstat -ntlp:"
echo ""
netstat -ntlp
echo "========================================================================================"
echo "free -mt:"
echo ""
free -mt
echo "========================================================================================"
echo "df -h:"
echo ""
df -h
echo "========================================================================================"
echo "tail /var/log/messages:"
echo ""
tail /var/log/messages
echo "========================================================================================"
echo "du -sch /var/spool/postfix/*:"
echo ""
du -sch /var/spool/postfix/*
echo "========================================================================================"
echo "ls -lsrth /var/log/maillog*:"
echo ""
ls -lsrth /var/log/maillog*
echo "========================================================================================"
echo "tail /var/log/maillog:"
echo ""
tail /var/log/maillog
echo "========================================================================================"