Jump to content

[Tutorial] Script Para Servload Check


DekWorld

Recommended Posts

Script faz um relatório Geral dos principais aplicativos e conexões.

#!/bin/bash 
 
cd / 
touch loadtest.txt 
 
echo  "LOAD STATUS" `date` >> /loadtest.txt 
echo "___________________" >> /loadtest.txt 
echo "___________________" >> /loadtest.txt 
echo " W Results  " >> /loadtest.txt 
w >> /loadtest.txt 
echo "___________________" >> /loadtest.txt 
echo "___________________" >> /loadtest.txt 
echo "PSTREE Resultados" >> /loadtest.txt 
echo "___________________" >> /loadtest.txt 
pstree -apu >> loadtest.txt 
echo "___________________" >> /loadtest.txt 
echo "___________________" >> /loadtest.txt 
echo "MYSQLADMIN Resultados" >> /loadtest.txt 
echo "___________________" >> /loadtest.txt 
mysqladmin proc status >> /loadtest.txt 
echo "___________________" >> /loadtest.txt 
echo "___________________" >> /loadtest.txt 
echo "Conexoes" >>/loadtest.txt 
netstat -plan |grep :80 | awk '{print $5}' |cut -d: -f1 | sort -n | uniq -c >>/loadtest.txt 
echo "___________________" >> /loadtest.txt 
echo "___________________" >> /loadtest.txt
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

Do you agree with our terms?