Showing posts with label Monitoring Commands in AIX & Linux. Show all posts
Showing posts with label Monitoring Commands in AIX & Linux. Show all posts

Friday, September 16, 2022

Monitoring Commands in AIX & Linux

 =================== Some Basic AIX Commands =============================== 

To Check physical memory utilization

#svmon -G 

#vmstat 


To see unsuccessful count 

#lsuser username

 

To reset the password after password change

#pwdadm –c username


To remove unsuccessful attempts 

#chuser unsuccessful_login_count=0 username 


To see CPU information 

#sar -u


To see process and utilization 

#topas 

 


=======================LVM commands in AIX =======================

#mkvg -y vgname -s pvname 

#mklv -y lvname -t jfs2 vgname `no. of LPs pvname 

#lslv 

#lsvg 

#crfs -v jfs2 -d /dev/lvname -m filesystem name 

To extend mountpoint 

#chfs -a size=+50G filesystemname 

 



=================Some Linux Basic Commands ==================

 

To see swap/Memory information 

#free -m 


To see unsuccessful count 

#pam_tally2 --user=username 


To remove unsuccessful attempts 

#pam_tally2 --user=username --reset 


To see CPU information 

#lscpu 

 

====To give sudo access======


 (Add entry in /etc/sudoers file) 

useradd –m –g dba -c “Rami Singh” -s /bin/bash rsingh 

username ALL=(ALL) /usr/bin/su - 


Userdd commands parameters - 

-m creating home directory 

-g to assign to primary group 

-c to define values in captions 

-s to define shell 

-G to secondary groups 

To set as password change prompt for first login 

#chage -d 0 username 

To see user password expiry date details 

#chage -l username

 

================================== For Patching in Linux - ======================

To removes the cache of repositories which are enabled in /etc/yum.repos.d/*.repo.

#yum clean all

 

To check update required patches 

#yum check-update

 

To install single package

#yum install packagename

 

To see package details

#yum info packagename

 

To check repolist count

#yum repolist

 

To update all patches 

#yum update

 

To check last updated details

 #yum history

 

To remove recently update package

#yum undo trans ID 

 

=========Check Swap space Utilization ======== 

Check Swap Space 

#vmstat 

#vmstat 1 10 

#swapon -s 

#cat /proc/swaps 


========Check CPU Utilization ========= 

 

#top 

#sar -u 1 10 

 

#ps -Ao user,uid,comm,pid,pcpu,tty --sort=-pcpu | head -n 10 

#ps -eo pid,ppid,cmd,%cpu,%mem --sort=-%cpu | head 

#ps aux | sort -nrk 3,3 | head -n 10 

 

===How to Check how long-time process is running ================ 

#ps -C rsyslogd -o pid,cmd,start,etimes,etime 

#ps -aux | grep rsyslog 

#ps -p 1122 -o etime (where 1122 is PID for rsyslogd) 

#ps -p 1122 -o pid,cmd,etime,uid,gid 


============Check Disk space ============ 

#df -h 

#du -sh /syslog 

#du -x -h -a /syslog | sort -r -h | head . 

Check only GB in file size 

#du -sh * | G 


Introduction to Linux Part 1

Introduction to Linux Part 1

Introduction to Linux Linux is an operating system that works just like Windows and Mac OS X. As an operating system, Linux is a very h...