State Script: Difference between revisions

From Federal Burro of Information
Jump to navigationJump to search
No edit summary
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
Doing a change on the system and not sure what will happen? Run this state script on a RHEL box before and after then diff.
Doing a change on the system and not sure what will happen? Run this state script on a RHEL box before and after then diff.
== RHEL (old )==


<pre>
<pre>
Line 20: Line 22:
/bin/netstat -rn
/bin/netstat -rn
echo "###########"
echo "###########"
echo list modules (sorted)
echo "list modules (sorted)"
echo "###########"
echo "###########"
/sbin/lsmod | sort
/sbin/lsmod | sort
Line 44: Line 46:
echo "###########"
echo "###########"
/sbin/service --status-all
/sbin/service --status-all
echo "###########"
echo iptables-save
echo "###########"
/sbin/iptables-save
echo "###########"
</pre>
== Ubuntu 20 ish ==
<pre>
#!/bin/sh
echo "###########"
echo uname
echo "###########"
uname -a
echo "###########"
echo ifconfig
echo "###########"
/sbin/ifconfig -a
echo "###########"
echo netstat
echo "###########"
/bin/netstat -avpn
echo "###########"
echo routing
echo "###########"
/bin/netstat -rn
echo "###########"
echo "list modules (sorted)"
echo "###########"
/sbin/lsmod | sort
echo "###########"
echo disk usage
echo "###########"
df -h
echo "###########"
echo mtab
echo "###########"
cat /etc/mtab
echo "###########"
echo kernel messages
echo "###########"
dmesg
echo "###########"
echo service configuration
echo "###########"
/sbin/systemctl
echo "###########"
echo "###########"
echo iptables-save
echo iptables-save

Latest revision as of 18:29, 20 March 2023

Doing a change on the system and not sure what will happen? Run this state script on a RHEL box before and after then diff.

RHEL (old )

#!/bin/sh
echo "###########"
echo uname
echo "###########"
uname -a
echo "###########"
echo ifconfig
echo "###########"
/sbin/ifconfig -a
echo "###########"
echo netstat
echo "###########"
/bin/netstat -avpn
echo "###########"
echo routing
echo "###########"
/bin/netstat -rn
echo "###########"
echo "list modules (sorted)"
echo "###########"
/sbin/lsmod | sort
echo "###########"
echo disk usage
echo "###########"
df -h
echo "###########"
echo mtab
echo "###########"
cat /etc/mtab
echo "###########"
echo kernel messages
echo "###########"
dmesg
echo "###########"
echo service configuration
echo "###########"
# only good on redhat-like systems
/sbin/chkconfig --list
echo "###########"
echo "/sbin/service --status-all"
echo "###########"
/sbin/service --status-all
echo "###########"
echo iptables-save
echo "###########"
/sbin/iptables-save
echo "###########"

Ubuntu 20 ish

#!/bin/sh
echo "###########"
echo uname
echo "###########"
uname -a
echo "###########"
echo ifconfig
echo "###########"
/sbin/ifconfig -a
echo "###########"
echo netstat
echo "###########"
/bin/netstat -avpn
echo "###########"
echo routing
echo "###########"
/bin/netstat -rn
echo "###########"
echo "list modules (sorted)"
echo "###########"
/sbin/lsmod | sort
echo "###########"
echo disk usage
echo "###########"
df -h
echo "###########"
echo mtab
echo "###########"
cat /etc/mtab
echo "###########"
echo kernel messages
echo "###########"
dmesg
echo "###########"
echo service configuration
echo "###########"
/sbin/systemctl
echo "###########"
echo iptables-save
echo "###########"
/sbin/iptables-save
echo "###########"