contents –
:Know your machine đ»
:Monitering
:Tweaks for better Administration
:Networking
:Searching
:Web Console
————————————————-
Bonus Command –
Record Terminal session –
script script_name.txt – to start record session
exit – to stop session
cat script_name.txt – to view the recorded session
1. Know your machine
Display Linux system information-
uname -a
Show operating version & name-
cat /etc/os-release
Show host name-
hostname
hostname -I
Display CPU information-
cat /proc/cpuinfo
Display memory/RAM –
cat /proc/meminfo
Display RAM usage (
free -h – Human redable format
free -m – in MBs
free -g – in GBs
Displays all environment variables running on the system.
env
reboot History
last reboot
Monitering
NMON – ‘TOP’ alternative for monitering-
nmon
NMON can be used as a better ‘top’ alternative.
1.CPU utilization,
2.Memory
3.Disks
4.Network utilization & more
In a better viewe where refresh rate can be adjusted by pressing +, – buttons.
Stats can be saved to CSV for later analysis & graphing.
Networking
Check connectivity & port opening status
ssh -vvv <IP> -p <PORT>
ssh -vvv 192.168.186.42 -p 9090
Purpose of machine
TWEAKS –
Increase SSH timeout –
vi /etc/ssh/sshd_config
insert/assign values as per following to set timeout to 1 hour –
ClientAliveInterval 1200
ClientAliveCountMax 3
RHEL Web Console
A web-based interface can be used for managing and monitoring RHEL systems in realtime. Follow the commands to enable & use RHEL web console-
Enable web console –
systemctl enable –now cockpit.socket
if cockpit package not installed –
dnfinstall cockpit
open port 9090 for web console –
firewall-cmd –add-service=cockpit –permanent
open browser & type URL –
https://IP or hostname:9090
e.g. https://192.168.186.42:9090/system
vim