My program:
__________________________________
#!/bin/ksh
DAY=`date +%y%m%d`
H=`date +%H`
M=`date +%M`
day=`date +%m/%d/%y`
let h=$H-1
echo DAY $DAY
echo H $H
echo M $M
echo day $day
echo h $h
_____________________________________
My result: (3 Replies)
Hi,
I am trying to grep a particular string from the files of 2 different servers without copying and calculate the total count of its occurence on both files.
File structure is same on both servers and for reference as follows:
27-Aug-2010... (4 Replies)
Hello All,
I am learning unix and basically I want to rotate one of my application logs every 1 hour. I need to rotate that file every one hour. I looked in the forums and googled.. but couldn;t get proper information. Requesting you all to kindly guide me.
Our application is running on... (4 Replies)
Hi everyone.
I am still new to UNIX, and am having trouble figuring out how to create a script to scan a log file to look for errors based on a string.
We run AIX 5.3, and would like the ability to report all the instances of WebSphere Broker Execution groups crashing. This script would... (8 Replies)
I have directory /test/logs which has multiple logs:
audit.log
audit.log.1
audit.log.2
audit.log.3
audit.log.4
audit.log.5
audit.log is current log file and audit.log.X are archive log files. I need to search within these log files and count word "error-5" logged within last 6 months... (4 Replies)
Hi friends, I want to convert 24 hour timing to 12 hour please help me...
my data file looks like this..
13-Nov-2011 13:27:36 15.32044 72.68502
13-Nov-2011 12:08:31 15.31291 72.69807
16-Nov-2011 01:16:54 15.30844 72.74028
15-Nov-2011 20:09:25 15.35096 ... (13 Replies)
Hi there,
I have a script that I've used to find errors in my Minecraft Server logs. But I'd like to refine that script to be more useful.
Here is the script:
grep -n "SEVERE" /minecraft/server.log | awk -F":" '{print $1-2 "," $1+10 "p"}' | xargs -t -i sed -n {} /minecraft/server.log >>... (15 Replies)
Hi Guys,
I want to write a script which can grep the logs (server.log) from a file for Error String and output to a other file.
Problems:
How to know about the errors only between the current restart and not in previous as server.log has earlier restarts also?
thanks for the help! Much... (5 Replies)
Discussion started by: ankur328
5 Replies
LEARN ABOUT ULTRIX
lb_register
lb_register(3ncs)lb_register(3ncs)Name
lb_register - register an object and an interface with the Location Broker
Syntax
#include <idl/c/lb.h>
void lb_$register(object, obj_type, obj_interface, flags, annotation, location, location_length, entry, status)
uuid_$t *object;
uuid_$t *obj_type;
uuid_$t *obj_interface;
lb_$server_flag_t flags;
unsigned char annotation[64];
socket_$addr_t *location;
unsigned long location_length;
lb_$entry_t *entry;
status_$t *status;
Arguments
object The UUID of the object being registered.
obj_type The UUID of the type of the object being registered.
obj_interface The UUID of the interface being registered.
flags Must be either lb_$server_flag_local (specifying registration with only the LLB at the local host) or 0 (specifying
registration with both the LLB and the GLB).
annotation A character array used only for informational purposes. This field can contain a textual description of the object and
the interface. For proper display by the tool, the annotation should be terminated by a null character.
location The socket address of the server that exports the interface to the object.
location_length The length, in bytes, of the socket address specified by the location field.
entry A copy of the entry that was entered in the Location Broker database.
status The completion status. If the completion status returned in is equal to status_$ok , then the routine that supplied it
was successful.
Description
The routine registers with the Location Broker an interface to an object and the location of a server that exports that interface. This
routine replaces any existing entry in the Location Broker database that matches object, obj_type, obj_interface, and both the address fam-
ily and host in location; if no such entry exists, the routine adds a new entry to the database.
If the flags parameter is the entry is registered only in the LLB database at the host where the call is issued. Otherwise, the flag
should be 0 to register with both the LLB and the GLB databases.
Examples
The following statement registers the interface to the object identified by :
lb_$register (&bank_id, &bank_$uuid, &bank_$if_spec.id, 0,
BankName, &saddr, slen, &entry, &status);
Diagnostics
This section lists status codes for errors returned by this routine in
lb_$database_invalid
The format of the Location Broker database is out of date. The database may have been created by an old version of the
Location Broker; in this case, delete the out-of-date database and reregister any entries that it contained. The LLB
or GLB that was accessed may be running out-of-date software; in this case, update all Location Brokers to the current
software version.
lb_$database_busy The Location Broker database is currently in use in an incompatible manner.
lb_$update_failed The Location Broker was unable to register the entry.
lb_$cant_access The Location Broker cannot access the database. Among the possible reasons:
1. The database does not exist, and the Location Broker cannot create it.
2. The database exists, but the Location Broker cannot access it.
3. The GLB entry table is full.
lb_$server_unavailable
The Location Broker Client Agent cannot reach the requested GLB or LLB. A communications failure occurred or the bro-
ker was not running.
FilesSee Alsointro(3ncs), lb_unregister(3ncs)lb_register(3ncs)