Posts

Showing posts from August 22, 2018

Log files - skip writing some unimportant (but frequent) strings

Image
Clash Royale CLAN TAG #URR8PPP up vote 0 down vote favorite I have a lot of unimportant similar (or even the same) reports in log files. I want to have my log files simple and transparent, so my idea is that some strings shouldn't be written in log files. An additional reason is to reduce writings to my SD card (Raspberry PI server). I'm sure that I saw solution before, but I can't find it now. Any idea what to do? syslog share | improve this question asked Mar 31 at 11:14 JanezKranjski 101 1 Which logging daemon do you use? Would you be willing to change it? – Hauke Laging Mar 31 at 11:36 I'm using Raspberry PI with Jessie (Debian). – JanezKranjski Mar 31 at 12:01 I have found in my backup how this was solved before: in /etc/rsyslog.conf was lines like ":msg, contains, "Router Advertisement" stop". And it worked. I have tried the same (with restarting service and compute

Kill processes recursively by their process ids given in a file

Image
Clash Royale CLAN TAG #URR8PPP up vote 0 down vote favorite I want to be able to kill some processes. I know the process id (that is given in file) and I do not want to do it one by one. Is there any way to do it something like calling kill command recursively and giving it input through file or standard input like we do with rm command... process kill share | improve this question edited Mar 31 at 12:23 Kusalananda 102k 13 201 317 asked Mar 31 at 12:05 Ashu 5 1 1 I don't know what you mean by "recursively", and rm does not read from standard input. – Kusalananda Mar 31 at 12:25 add a comment  |  up vote 0 down vote favorite I want to be able to kill some processes. I know the process id (that is given in file) and I do not want to do it one by one. Is there any way to do it something like calling kill command recursively and giving it input through file or standard input like

Monitoring of cron jobs in crontab using shell script

Image
Clash Royale CLAN TAG #URR8PPP up vote 0 down vote favorite Could someone help in writing a shell script to monitor different cron jobs in crontab. As everyone knows different cron jobs run at different time I want to capture following things in ".csv" format: Script Name Scheduled times Next scheduled time Last Run time. Did the script ended successfully or it had an error after executing (Success/Fail). I have certain limitations: syslog is not printing all the debug logs. Can't edit crontab . I have logs which are directed which could be used. shell-script cron logs share | improve this question edited Mar 31 at 13:18 Yurij Goncharuk 2,258 2 5 21 asked Mar 31 at 12:23 Vivek 1 1 1 Unless you have root access this is next to impossible because the necessary information is not available to non- root users. If you do have root you can edit crontab (technically, if not administratively). – roaima Mar 31 a