i use the following commands and form a script to automate servers using Linux now i would like to automate it in python,i dont know how to write commands for these as i am new to python.
echo "DISK SPACE"
echo "--------------------- "
df -kh
echo "CPU UTILIZATION"
prstat 1 1
echo "MEMORY UTILIZATION"
echo "--------------------- "
vmstat
echo "LINK STATUS"
echo "--------------------- "
egrep -i "link||service" logs/septel.log|tail -20
echo "Restart log"
echo "--------------------- "
tail -10 //newlogs/restart.log
echo "MENU"
echo "--------------------- "
echo "0"|/operations/Menu.pl
dat=`date +%Y%m%d`
echo "================================== "
echo "EOD "
cat /b-eod/eodclearlog.log
echo "mart STP"
echo "--------------------- "
tail /logs/mart-stp.log
echo "TNSPING STATUS"
echo "========================================= "
tnsping rwdb