[WLUG] Linux, Monero and Hardware Issue
Chris Baty
batymahn at gmail.com
Tue Mar 28 14:21:01 EDT 2017
Thanks Paul,
I’ll give it a try. My Hard drive crapped out - AGAIN.
Chris
> On Mar 26, 2017, at 9:29 PM, Paul <set.mailinglist at gmail.com> wrote:
>
> Chris Baty <batymahn at gmail.com>, on Sun 2017.03.26 said:
>> Hi guys,
>> A juicy Linux question now: I got my XMR miner working now and it spits
>> out activities to I assume stdio, or the terminal. It occasionally hangs
>> and the process has to be killed and restarted. I was wondering if you
>> could write a script where you write the output to a file, with a
>> timestamp. If the timestamp was older than 10 seconds than kill and
>> restart the miner?
>> Thanks.
>> Chris
>>
>
> Hi;
>
> You could use stat with something like this simple script, I suppose:
>
> Paul
>
> ------
>
> #!/bin/sh
>
> INTERVAL="10s"
> FILE="logfile"
> MTIME=$(stat -c "%y" $FILE)
> while true; do
> echo "$MTIME"
> sleep $INTERVAL
> NEW_MTIME=$(stat -c "%y" $FILE)
> if [ "$MTIME" = "$NEW_MTIME" ] ; then
> echo "$FILE was not modified in the space of $INTERVAL"
> # restart daemon here
> fi
> MTIME=$NEW_MTIME
> done
>
> ______________________________________________________
> washlug mailing list washlug web site
> washlug at washlug.org www.washlug.org
> http://linux.marcdatabase.com/mailman/listinfo/washlug
More information about the washlug
mailing list