Log currently running shell processes into a file in every 30 seconds. #Linux/Unix: Shell Programming – 001

#!/bin/sh

#find all currently running shells and create in full listing form for them . Log the data into a file in every 30 secs
# -e means currentl running
# -f means full format output
# sleep takes parameters in seconds

ps -ef | grep shell >> process.log
sleep 30

ps -ef | grep shell >> process.log
sleep 30

ps -ef | grep shell >> process.log
sleep 30 From: http://sitestree.com/?p=12193
Categories:Linux/Unix: Shell Programming – 001
Tags:
Post Data:2018-04-16 19:08:10

Shop Online: https://www.ShopForSoul.com/
(Big Data, Cloud, Security, Machine Learning): Courses: http://Training.SitesTree.com
In Bengali: http://Bangla.SaLearningSchool.com
http://SitesTree.com
8112223 Canada Inc./JustEtc: http://JustEtc.net (Software/Web/Mobile/Big-Data/Machine Learning)
Shop Online: https://www.ShopForSoul.com/
Medium: https://medium.com/@SayedAhmedCanada