Sunday, March 6, 2022

                                                 File system utilization.


How to check what all are top files consume the more space.


# du -axh / | awk '{if($1 ~ /G/)print $0}'

How to zip the jmgr file and touch new file of jmgr


gzip jmgr && touch jmgr


How make tar of one month logs and remove the log files


#tar -czvf  access_log.2020-Dec2020.tar.gz access_log.2020-12*

 # rm -rf access_log.2020-12*


                                                    Top Cpu utilized processes


# ps -eo pcpu,pid,user,args | sort -k 1 -r | head -1

# top

# date;hostname;uptime;sar 1 5


                        To set Kernal parameters

sysctl -w net.ipv4.ip_forward="0" >> /etc/sysctl.conf

No comments:

Post a Comment