Changes between Version 4 and Version 5 of rrdtool


Ignore:
Timestamp:
02/01/22 02:52:23 (3 years ago)
Author:
krit
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • rrdtool

    v4 v5  
    1919OMD[monitor@501264b41d2d]:~/var/log$ awk -F"[][]" '{cmd="date -d@" $2;cmd |getline $2; close(cmd)}1' naemon.log
    2020}}}
    21 Here we set a shell command date -d@$2 to a variable called cmd. Then with cmd |getline $2 the awk reads a line and pass second field value to the cmd we open it, then we need close the command we opened via pipe, so we used close(cmd)
     21Here we set a shell command date -d@$2 to a variable called cmd. Then with cmd |getline $2 the awk reads a line and pass second field value to the cmd we open it, then we need close the command we opened via pipe, so we used close(cmd)[[br]]
     22Or we can used
     23{{{
     24#!sh
     25OMD[monitor@501264b41d2d]:~/var/log$ tail naemon.log | awk -F"[][]" '{cmd="date -d@" $2;cmd |getline $2; close(cmd)}1'
     26}}}