linux - parse info from log files and quering process table -
i trying check how many log files have been modified in last 10 minutes , list them. want in incriminates of 30. output this:
log files modified in last 10 minutes: x list of these files: /var/log/messages /var/log/lastlog /var/log/wtmpp /var/log/cron log files modified in last 30 minutes: x list of these files: ....
further, want query process table , following:
total # of processes: x number of active user processes user: root: 98 (or many) apache: 65 usera: 33 userb: 23 top 5 processes using memory listing of processes
i think can # of log files command:
find /var/log/ -name '*.log' -mmin 10
and count them adding " | wc -l" #
but errors when try that.
any suggestions on how go appreciate.
note, should write -10 mmin.
find /var/log/ -name '*.log' -mmin -10
Comments
Post a Comment