Sponsored Content
Top Forums Programming serializing logging output mult. proc. inst deamon Post 302101775 by heck on Thursday 4th of January 2007 09:30:13 AM
Old 01-04-2007
CPU & Memory serializing logging output mult. proc. inst deamon

Hello, i have an interresting topic today

C++ on solaris. lgpl stuff applicable.
My program is a deamon process wich takes input from network, then processes the data, and outputs reformatted to network. We're generating a lot of logging output. the logging is absolutely unbuffered at the moment like a log should be, fire and forget. (to a file ot STDOUT)

I cant run multiple process instances concurrently because there is no file locking implemented. I cant write to the same logfile from different processes. That means that i would end up with one logfile for each process. unusable.

problem:
I want to run multiple instances of the same process at the same time. The log output has to be in one logfile. The chunks wich are a unit must stay consectutive (there has to be buffer somewhere, i guess). And this i the only change i really want to commit to the existing program, 1 line in the code which tells when 1 "unit" is processed.I want as few changes as possible in the existing program.

How would you propose to achieve that?

i exclude all the "housekeeper process which concats all the generated logs once a day or sth." like ideas. This is crap.


And yeah the _MOST_ important thing.
My head is rolling if i lose 1 byte of logging output ever, under all circumstances. That means if you have ideas in client-server style (pipes sockets, shm, whatever) it has to be transactionoriented somehow.

I is an interresting problem, i greatly appreciate every creative idea!!!
Thanks folks!
Heck
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Inst. Solaris10

I just download solaris 10, from sun.com, I have them ziped in my HD, How can I install them, so I can run solaris10, my present os is RH9; THANKS (5 Replies)
Discussion started by: mxlst14
5 Replies

2. UNIX for Advanced & Expert Users

logging ps output

i want to log the output of ps. i want to see the ps outpıt line by line as i see in the stdout but when i write it to a file it concatenates all lines do you have any suggestion? what i am using: echo `ps -ef -o cmd,cpu,pcpu,cputime,nswap`>>log.txt what i am getting: Mon Sep 11... (3 Replies)
Discussion started by: gfhgfnhhn
3 Replies

3. Shell Programming and Scripting

Redirection of output (for logging)

Hi, Currently I'm working on a lenghty script so I figured it would be useful to create a logfile so that output that is displayed on the users screen is also stored in the log file for later reference...... kinda like the whole point of a log file! Anyway, I was just wondering if there was an... (3 Replies)
Discussion started by: _Spare_Ribs_
3 Replies

4. Solaris

Logging commands and output

I'm looking for a CLI utility that will capture all the commands you type at the Solaris CLI (and their output) into a file. I'm sure it's called "scripter", but I can't find anything on a command called scripter. Does anyone know of a such a command? Your help will be greatly... (3 Replies)
Discussion started by: soliberus
3 Replies

5. UNIX for Dummies Questions & Answers

_/proc/stat vs /proc/uptime

Hi, I am trying to calculate the CPU Usage by getting the difference between the idle time reported by /proc/stat at 2 different intervals. Now the 4th entry in the first line of /proc/stat will give me the 'idle time'. But I also came across /proc/uptime that gives me 2 entries : 1st one as the... (0 Replies)
Discussion started by: coderd
0 Replies

6. UNIX for Dummies Questions & Answers

Logging Command Line and Output in Unix

Hi, This might be a bit stupid question, but what command to use to create like a session which logs the command line, and output on to the screen? Basically, a log to a file, where I can review what I had install, uninstall, etc. Thank you (4 Replies)
Discussion started by: kittoinc
4 Replies

7. UNIX for Advanced & Expert Users

Serializing script Failing for more commands

I have a reqirement to serialise various rsh scripts that hit my server from an external scheduler. No matter how many scripts come via rsh, only one should execute at a time and others should wait. I have made the scheduler make a request to my shell script with the command to be run as a... (4 Replies)
Discussion started by: nkamatam
4 Replies

8. Red Hat

Output of /proc/version

Hi, I am a newbie in Linux. Appended is the output of cat /proc/version and uname -a. # cat /proc/version Linux version 2.6.32.12-115.fc12.i686 (mockbuild@x86-03.phx2.fedoraproject.org) (gcc version 4.4.3 20100127 (Red Hat 4.4.3-4) (GCC) ) #1 SMP Fri Apr 30 20:34:53 UTC 2010 # uname -a... (7 Replies)
Discussion started by: Hari_Ganesh
7 Replies

9. Shell Programming and Scripting

how to convert string to an integer and how to do calculations like add.,sub.,mult. on it

How to convert string into an integer or number For example : % set tim = `date` % echo $tim Tue Feb 22 16:25:08 IST 2011 here How to increment time by 10 hrs like 16+10 , here 16 is a string in date cmd. .. how to convert 16 to an integer and added to a another nimber ? Thanks... (3 Replies)
Discussion started by: sbhamidi
3 Replies

10. Solaris

Logging the memory consumed by a process with c/C++ without using proc

I need to log the size of physical/virtual memory consumed by any given given process using c/c++ code running on solaris and aix without using the proc filesystem. Please advise. (1 Reply)
Discussion started by: Manisha Paul
1 Replies
audit_startup(1M)                                         System Administration Commands                                         audit_startup(1M)

NAME
audit_startup - audit subsystem initialization script SYNOPSIS
/etc/security/audit_startup DESCRIPTION
The audit_startup script is used to initialize the audit subsystem before the audit deamon is started. This script is configurable by the system administrator, and currently consists of a series of auditconfig(1M) commands to set the system default policy, and download the initial event to class mapping. SEE ALSO
auditconfig(1M), auditd(1M), bsmconv(1M), attributes(5) NOTES
The functionality described in this man page is available only if the Basic Security Module (BSM) has been enabled. See bsmconv(1M) for more information. SunOS 5.10 6 May 1993 audit_startup(1M)
All times are GMT -4. The time now is 06:31 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy