--Read the config file line by line
--lines contains 8 columns
--validate from 8th column saying status if 1 active else inactive.
--1st column should pass as stream
--2nd column as path
--3rd column as counter
--4th column as counterlimit
--5th column from the files inside the path 1st column of the file and 4th column condition wise.
Quote:
Firstly it will read each line and check the 8th column as status.
if status vale is 1
go to my function
pass each line in for loop.
1st column as argument saying stream
2nd column for path
3rd column counts.
4th column in if condition saying 3rd column less than equal to it.
5th column help to read each file of the path and from file read 1st column.
and further implement the logic.
---------- Post updated at 06:32 AM ---------- Previous update was at 06:25 AM ----------
Hello to all,
I am looking for a way to display only the names of function (calls & definition) of a C++ source code.There is already a post related to this, but the script is to find the functions using a specific variable, and the replies are not that convincing since they cannot be used for... (2 Replies)
Hello forum members,
I have to create a out file in the current path./aaa/bbb/ccc/hhh.
i am writing script below.
###script Begins#####
#!/bin/ksh
echo "Weclome"
if
then
echo "Hello"
rm -rf $aaa/bbb/ccc/hhh #clean the exsisting o/p file
echo "no... (2 Replies)
I have a shell script (.sh) and I want to pass a parameter value to the awk command but I am getting exception, please assist.
diff=$1$2.diff
id=$2 new=new_$diff
echo "My id is $1"
echo "I want to sync for user account $id"
##awk command I am using is as below
cat $diff | awk... (2 Replies)
Hello,
I am trying to execute an SQL query from shell script.
A part of script is something like this:
fromDate=`echo $(date +"%F%T") | sed "s/-//g" | sed "s/://g"`
$ORACLE_HOME/sqlplus -s /nolog <<EOD1
connect $COSDBUID/$COSDBPWD@$COSDBSID
spool... (4 Replies)
Dear Unix gurus,
We have a config shell script file which has 30 variables which needs to be passed to master unix shell script that invokes oracle database sessions. So those 30 variables need to go through the database sessions (They are inputs) via a shell script. one of the variable name... (1 Reply)
Dear Unix gurus,
We have a config shell script file which has 30 variables which needs to be passed to master unix shell script that invokes oracle database sessions. So those 30 variables need to go through the database sessions (They are inputs) via a shell script. one of the variable name... (1 Reply)
The file starts like this:
Directory: <path to the script>
Script: <script fife name>
#!bin/ksh
##Comments
<actual script>
What is the use of the first two lines in the script? What if I save the file without them? What will be the effect? They are not comments. Im very new to this,... (4 Replies)
Need ideas on how to achieve the below.
We have a script say "profile.sh" which internally calls another existing script called "name.sh" which prompts for the
name and age of a person upon execution. When i run profile.sh how can i populate a pre-defined value from another file and pass that... (1 Reply)
Ceiling Light - The Forgotten Element
One of the highest details concerning using an LED ceiling panel essentially offer a fantastic dance floor which definitely makes the customers dance right away.They are a quite low cost method of something like a lighting solution, simple collection up,... (1 Reply)
I just want to make sure I am understanding how to pass a config file to a bash script . In the below I pass to arguments to a script, then define them in the script as id and config. I then source config using ., if I understand correctly the variables in the config file can now be used by the... (11 Replies)
Discussion started by: cmccabe
11 Replies
LEARN ABOUT CENTOS
mrtg-logfile
MRTG-LOGFILE(1) mrtg MRTG-LOGFILE(1)NAME
mrtg-logfile - description of the mrtg-2 logfile format
SYNOPSIS
This document provides a description of the contents of the mrtg-2 logfile.
OVERVIEW
The logfile consists of two main sections.
The first Line
It stores the traffic counters from the most recent run of mrtg.
The rest of the File
Stores past traffic rate averates and maxima at increassing intervals.
The first number on each line is a unix time stamp. It represents the number of seconds since 1970.
DETAILS
The first Line
The first line has 3 numbers which are:
A (1st column)
A timestamp of when MRTG last ran for this interface. The timestamp is the number of non-skip seconds passed since the standard UNIX
"epoch" of midnight on 1st of January 1970 GMT.
B (2nd column)
The "incoming bytes counter" value.
C (3rd column)
The "outgoing bytes counter" value.
The rest of the File
The second and remaining lines of the file contains 5 numbers which are:
A (1st column)
The Unix timestamp for the point in time the data on this line is relevant. Note that the interval between timestamps increases as you
progress through the file. At first it is 5 minutes and at the end it is one day between two lines.
This timestamp may be converted in OpenOffice Calc or MS Excel by using the following formula
=(x+y)/86400+DATE(1970;1;1)
(instead of ";" it may be that you have to use "," this depends on the context and your locale settings)
you can also ask perl to help by typing
perl -e 'print scalar localtime(x),"
"'
x is the unix timestamp and y is the offset in seconds from UTC. (Perl knows y).
B (2nd column)
The average incoming transfer rate in bytes per second. This is valid for the time between the A value of the current line and the A
value of the previous line.
C (3rd column)
The average outgoing transfer rate in bytes per second since the previous measurement.
D (4th column)
The maximum incoming transfer rate in bytes per second for the current interval. This is calculated from all the updates which have
occured in the current interval. If the current interval is 1 hour, and updates have occured every 5 minutes, it will be the biggest 5
minute transfer rate seen during the hour.
E (5th column)
The maximum outgoing transfer rate in bytes per second for the current interval.
AUTHOR
Butch Kemper <kemper@bihs.net> and Tobias Oetiker <tobi@oetiker.ch>
2.17.4 2012-01-12 MRTG-LOGFILE(1)