Page 3 of 3

Re: [userModule] Network Presence

Posted: 12 Mar 2018 15:57
by Provo
It outputs in the normal Z-Way log file. /var/log/z-way-server.log normally.

Try for instance to grep with:

Code: Select all

grep -A 3 "[NetworkPresence]" /var/log/z-way-server.log

Re: [userModule] Network Presence

Posted: 12 Mar 2018 16:36
by Eagle
i tried the grep command you suggested, but this only outputs a usage info for grep.

now i opened the file with nano and im trying to find relevant networkpresence lines, the file is quite big

Re: [userModule] Network Presence

Posted: 12 Mar 2018 16:57
by Provo
Eagle wrote:
12 Mar 2018 16:36
i tried the grep command you suggested, but this only outputs a usage info for grep.
That's weird. I see that I forgot to escape the brackets, but it shouldn't output usage info nonetheless. I mean, I'm doing it right now. Are you sure you copied the exact text? Here's the version escaping the brackets:

Code: Select all

grep -A 3 "\[NetworkPresence\]" /var/log/z-way-server.log
Eagle wrote:
12 Mar 2018 16:36
then i tried tail -f /var/log/z-way-server.log
That gives you the end of the file "live" as new entries are made. You can use that method, if it's not being flooded with information so fast you can't pick it out, and either wait for the cron job or you can find the network presence element in the Z-Way UI and click the small time text with the clock icon which should execute a polling of that specific device.

Re: [userModule] Network Presence

Posted: 12 Mar 2018 17:06
by Eagle
i tried grep again:
root@MyCloudPR4100 root # grep -A 3 "\[NetworkPresence\]" /var/log/z-way-server.
log
grep: unrecognized option '--color=auto'
BusyBox v1.27.2 () multi-call binary.

Usage: grep [-HhnlLoqvsriwFE] [-m N] [-A/B/C N] PATTERN/-e PATTERN.../-f FILE [FILE]...

Search for PATTERN in FILEs (or stdin)

-H Add 'filename:' prefix
-h Do not add 'filename:' prefix
-n Add 'line_no:' prefix
-l Show only names of files that match
-L Show only names of files that don't match
-c Show only count of matching lines
-o Show only the matching part of line
-q Quiet. Return 0 if PATTERN is found, 1 otherwise
-v Select non-matching lines
-s Suppress open and read errors
-r Recurse
-i Ignore case
-w Match whole words only
-x Match whole lines only
-F PATTERN is a literal (not regexp)
-E PATTERN is an extended regexp
-m N Match up to N times per file
-A N Print N lines of trailing context
-B N Print N lines of leading context
-C N Same as '-A N -B N'
-e PTRN Pattern to match
-f FILE Read pattern from file
root@MyCloudPR4100 root #

tail -f did not update and the showed lines matched the last lines seen in nano. the last lines of this log are from 2018-03-07?

Is there a chance that my log is full (411961 lines) and now is not updated anymore?

Re: [userModule] Network Presence

Posted: 12 Mar 2018 17:30
by Provo
Eagle wrote:
12 Mar 2018 17:06
grep: unrecognized option '--color=auto'
You have an alias for grep that doesn't work on your system. Run "unalias grep" and try again. But note that "unalias" will only have effect for the current session. I'm sure you can find out how to remove it permanently on your system (it could be a number of places).
Eagle wrote:
12 Mar 2018 17:06
Is there a chance that my log is full (411961 lines) and now is not updated anymore?
That seems unlikely. On other Linux systems, it renames the log file in a numbering scheme, creates a new z-way-server.log and keeps logging. I don't know what it does on your system. But you could try to see if any other log files in the same folder are related and looks newer. If not, I'm afraid you will need to ask the Z-Way developers about what is going on there.