I am getting a variable as x=2006/01/18
now I have to extract each field from it.
Like x1=2006, x2=01 and x3=18.
Any idea how?
Thanks a lot for help.
Thanks
CSaha (6 Replies)
I've got a file with each record on a separate line and each record contains 34 fields separated by a colon and i'm trying to re-arrange the order of the fields and merge together certain fields separated by a slash (like field7/field28). I tried using an awk print statement like
awk -F: 'BEGIN... (5 Replies)
Hi guys,
I couldn't find solution to this problem. If anyone knows please help me out.
your guidance is highly appretiated.
I have two files -
FILE1 has the following 7 columns ( - has been added to make columns visible enough else columns are separated by single space)
155.34 - leg - 1... (8 Replies)
Howdy guys,
I have 2 sun solaris server(T200) in cluster mode.
I put the command below ntpq -p.
I need your help to understand the output. I plan to change the date and time in both server.
node1:/home/mydir> ntpq -p
remote refid st t when poll reach delay ... (6 Replies)
Diff output as follows:
< AAA BBB CCC DDD EEE 123
> PPP QQQ RRR SSS TTT 111
> VVV WWW XXX YYY ZZZ 333
> AAA BBB CCC DDD EEE 124
How can i use awk to compare the last field to determine if the counter has increased, and need to ensure that the first 4 fields must have the same... (15 Replies)
Attached is a file called diff.txt
It is the output from this command:
diff -y --suppress-common-lines --width=5000 1.txt 2.txt > diff.txt
I have also attached 1.txt and 2.txt for your convenience.
Both 1.txt and 2.txt contain one very long CSV string.
File 1.txt is a CSV dump of... (0 Replies)
Hi
i an not able to understand what below command in saying in its O/P
what i understand is the astrick(*) one is acting as a ntp master.
but not able to understand what insane and sys.peer here means.
# ntpq
ntpq> pe
remote refid st when poll reach delay ... (2 Replies)
Problem with external aerial and galleonm time server just turned back on. I'm guessing this is telling me its not worked for 9 days?
Should I now force a poll or wait?
$ntpq -p
remote refid st t when poll reach delay offset disp... (2 Replies)
Could you please let me know what each of the output fields in ls -ltr for a directory imply.
Example :
drwxrwsr-x 4294967295 infamgr infagrp 2147549184 Sep 2 17:01 job
basically would want to know 4294967295 and 2147549184 (6 Replies)
I need to print field and the next one if field matches 'patternA' and also print 'patternB' fields.
echo "some output" | awk '{for(i=1;i<=NF;i++){if($i ~ /patternA/){print $i, $(i+1)}elif($i ~ /patternB/){print $i}}}'
This code returnes me 'syntax error'. Pls advise how to do properly. (2 Replies)
Discussion started by: urello
2 Replies
LEARN ABOUT SUSE
tnm::ntp
ntp(n) Tnm Tcl Extension ntp(n)
__________________________________________________________________________________________________________________________________________________NAME
ntp - Retrieve NTP status information.
_________________________________________________________________DESCRIPTION
The Network Time Protocol (NTP) (RFC 1119, RFC 1305) allows to synchronize computer clocks by exchanging NTP messages. The ntp command
allows to retrieve control variables from NTP peers.
NTP COMMAND
ntp [options]
Invoking the ntp command with options but without any command arguments allows to retrieve and change the default values. See the
description of supported options below. Default values are bound to a Tcl interpreter which allows to have multiple Tcl interpreter
with different defaults.
ntp [options] host arrayName
The ntp command sends a NTP version 3 mode 6 request to host and writes status information into the Tcl array arrayName. After suc-
cessful completion, the array will contain the following elements (RFC 1305):
peer.delay
This is a signed fixed-point number indicating the roundtrip delay of the peer clock relative to the local clock over the
network path between them, in seconds.
peer.dispersion
This is a signed fixed-point number indicating the maximum error of the peer clock relative to the local clock over the net-
work path between them, in seconds.
peer.offset
This is a signed, fixed-point number indicating the offset of the peer clock relative to the local clock, in seconds.
peer.precision
This is a signed integer indicating the precision of the various clocks, in seconds to the nearest power of two.
peer.reach
This is a shift register used to determine the reachability status of the peer, with bits entering from the least significant
(rightmost) end. A peer is considered reachable if at least one bit in this register is set to one.
peer.srcadr
This is the IP address of the peer.
peer.stratum
This is an integer indicating the stratum of the local clock.
peer.valid
This is an integer counter indicating the valid samples remaining in the filter register. It is used to determine the reacha-
bility state and when the poll interval should be increased or decreased.
sys.peer
This is a selector identifying the current synchronization source.
sys.precision
This is a signed integer indicating the precision of the various clocks, in seconds to the nearest power of two.
sys.refid
This is a 32-bit code identifying the particular reference clock.
sys.rootdelay
This is a signed fixed-point number indicating the total roundtrip delay to the primary reference source at the root of the
synchronization subnet, in seconds.
sys.rootdispersion
This is a signed fixed-point number indicating the maximum error relative to the primary reference source at the root of the
synchronization subnet, in seconds.
sys.stratum
This is an integer indicating the stratum of the local clock
sys.system
A textual description of the system type.
NTP OPTIONS
The following options control how NTP requests are send and how the ntp command deals with lost NTP packets.
-timeout time
The -timeout option defines the time the ntp command will wait for a response. The time is defined in seconds with a default of 2
seconds.
-retries number
The -retries option defines how many times a request is retransmitted during the timeout interval. The default number of retries is
2.
SEE ALSO scotty(1), Tnm(n), Tcl(n)
AUTHORS
Erik Schoenfelder <schoenfr@gaertner.de>
Juergen Schoenwaelder <schoenw@cs.utwente.nl>
Tnm ntp(n)