Help need to write a script on column separation for syslog output in perl
HI Pros,
I have a issue.I need to write a script to parse the logs got from syslog server and update the same in my database.I need the following output.I donot know perl and I heard it very easy to write in perl
I have the sample log I need each column seperated by commas and all equals need to be removed ie date= time= needs to be removed
THis is the same log
I need the following output
This output will be very easy when I update in database
Last edited by pludi; 10-26-2009 at 01:38 PM..
Reason: code tags, please
Hello friends,
I am having a awk script which does my goal , but I want to learn perl , after learning the basics in perl now I am trying to convert my nawk script to perl .
Please help me to do some task in perl that I ve already did in nawk.
Like I am facing some problem in... (10 Replies)
i am trying to write a script to parse some tcpdump output, in each line of the tcpdump output, I know for sure there are 3 keywords exist:
User{different usernamehere}
NAS_ipaddr{different ip here}
Calling_station{ip or dns name here}
But the positions for these 3 keywords in the... (4 Replies)
Hi,
Can anyone please help me with this issue.
I have a Awk command which take file as input, and provides the output having multiple lines, its working in command mode, but not if i plug it in script.
#!/bin/ksh
infile=a.txt
outfile=b.txt
awk '
BEGIN{
FS=OFS="|";ORS = "\n";... (1 Reply)
All,
Can anyone please help me with the below scenario in korn shell script.
Can anyone please give me some hints to proceed on this.
I have a Flat file of the below format.
Input file format:... (1 Reply)
Hey everyone!
I have a tab delimited data set which I want to create an output contained the calculation of number of those lines with a certain value in 2nd and 3rd column.
my input file is like this:
ID1 1 10M AAATTTCCGG
ID2 5 4M ACGT
ID3 5 8M ACCTTGGA
ID4 5 ... (7 Replies)
can any one suggest me on how to write a update query in perl script for Oracle database and also tell me abt how we can write a code for sending mails with report as attachment to appropriate persons? (1 Reply)
Hi,
I have on Designdocument in that information is stored with in tabular format.I need Perlscript to read and write the datausing perl script?
Regards,
Ravi (0 Replies)
Hi ,
I got the following script from internet to display queue depth using Perl Script. However, when I execute it , im getting following error. Can anyone shed light on what is going wrong?
#!/usr/bin/perl
## 07/23/01
## Depth Inquiry sample program.
## Arguments:
## Connects to... (11 Replies)
Hi there,
say I have a line with multiple columns but with different separation formats: spaces, tabs..
Is it possible to have AWK print the separation format between each column? (10 Replies)
hi,
Hope you are doing good.
During my coding yesterday i got this challenge, actually not a challenge it like to optimize the code.
I am printing some statement to monitor the file progress in the log file an also to display it in the screen. so i ended up in the below statements.
... (6 Replies)
Discussion started by: mad man
6 Replies
LEARN ABOUT LINUX
nisping
nisping(1M)nisping(1M)NAME
nisping - send ping to NIS+ servers
SYNOPSIS
/usr/lib/nis/nisping [-uf] [-H hostname] [-r | directory]
/usr/lib/nis/nisping -C [-a] [-H hostname] [directory]
In the first line, the nisping command sends a ``ping'' to all replicas of an NIS+ directory. Once a replica receives a ping, it will
check with the master server for the directory to get updates. Prior to pinging the replicas, this command attempts to determine the last
update "seen" by a replica and the last update logged by the master. If these two timestamps are the same, the ping is not sent. The -f
(force) option will override this feature.
Under normal circumstances, NIS+ replica servers get the new information from the master NIS+ server within a short time. Therefore, there
should not be any need to use nisping.
In the second line, the nisping -C command sends a checkpoint request to the servers. If no directory is specified, the home domain, as
returned by nisdefaults(1), is checkpointed. If all directories, served by a given server, have to be checkpointed, then use the -a option.
On receiving a checkpoint request, the servers would commit all the updates for the given directory from the table log files to the data-
base files. This command, if sent to the master server, will also send updates to the replicas if they are out of date. This option is
needed because the database log files for NIS+ are not automatically checkpointed. nisping should be used at frequent intervals (such as
once a day) to checkpoint the NIS+ database log files. This command can be added to the crontab(1) file. If the database log files are not
checkpointed, their sizes will continue to grow.
If the server specified by the -H option does not serve the directory, then no ping is sent.
Per-server and per-directory access restrictions may apply; see nisopaccess(1). nisping uses NIS_CPTIME and NIS_PING (resync (ping) of
replicas), or NIS_CHECKPOINT (for checkpoint). Since the NIS_PING operation does not return a status, the nisping command is typically
unable to indicate success or failure for resyncs.
-a Checkpoint all directories on the server.
-C Send a request to checkpoint, rather than a ping, to each server. The servers schedule to commit all the transactions to
stable storage.
-H hostname Only the host hostname is sent the ping, checked for an update time, or checkpointed.
-f Force a ping, even though the timestamps indicate there is no reason to do so. This option is useful for debugging.
-r This option can be used to update or get status about the root object from the root servers, especially when new root
replicas are added or deleted from the list.
If used without -u option, -r will send a ping request to the servers serving the root domain. When the replicas receive a
ping, they will update their root object if needed.
The -r option can be used with all other options except with the -C option; the root object need not be checkpointed.
-u Display the time of the last update; no servers are sent a ping.
-1 No servers were contacted, or the server specified by the -H switch could not be contacted.
0 Success.
1 Some, but not all, servers were successfully contacted.
Example 1: Using nisping
This example pings all replicas of the default domain:
example% nisping
Note that this example will not ping the org_dir and groups_dir subdirectories within this domain.
This example pings the server example which is a replica of the org_dir.foo.com. directory:
example% nisping -H example org_dir.foo.com.
This example checkpoints all servers of the org_dir.bar.com. directory.
example% nisping -C org_dir.bar.com.
NIS_PATH If this variable is set, and the NIS+ directory name is not fully qualified, each directory specified will be
searched until the directory is found.
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWnisu |
+-----------------------------+-----------------------------+
crontab(1), nisdefaults(1), nisopaccess(1), nislog(1M), nisfiles(4), attributes(5)
NIS+ might not be supported in future releases of the SolarisTM Operating Environment. Tools to aid the migration from NIS+ to LDAP are
available in the Solaris 9 operating environment. For more information, visit http://www.sun.com/directory/nisplus/transition.html.
12 Dec 2001 nisping(1M)