Sponsored Content
Full Discussion: Check programs used most
Top Forums UNIX for Advanced & Expert Users Check programs used most Post 302436018 by ygemici on Friday 9th of July 2010 03:04:00 AM
Old 07-09-2010
Question

No for use crontab maybe different method..This code is appended in service scripts..
for Crontab usage you may another script for exa
this script must run every one minute and check the
like this
Code:
 
pid=`cat /var/run/somedaemon
lasptpid=$pid ; 
count=0
if [ `ps -p $pid -o comm=` ] ; then 
echo "active and still running"; else echo "daemon is not running" 
if [ $lastpid != $pid ] ; then "echo new daemon start" ; let count=$count+1 ;else echo "process still running" ; fi; fi
a=$count+$a
echo `ps -p $pid -o comm=` daemon $a times started

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Where did my programs go?

I notice that (Mandrake) Linux and Windows do not seem to operate alike in terms of installing third party software. Windows, on one hand, creates icons and adds items to the Start Menu, with the help of the InstallShield--or equivalent, of course, but Linux, on the other hand, seems to care... (3 Replies)
Discussion started by: helvetica
3 Replies

2. Programming

TSR programs

hi I want to write a tsr routine which use to replace the screen saver program, is it possible in unix? how to write a tsr in UNIX? what is address of screen saver program so that i can replace my routine in that address. (6 Replies)
Discussion started by: rajashekaran
6 Replies

3. Linux

Linux-programs

I have installed Red Hat Linux 9.0 recently on my computer. Im wondering if there are any good sites for downloading linux programs besides the site of Red Hat. Thank you in advance!:D (4 Replies)
Discussion started by: SolidSnake
4 Replies

4. Shell Programming and Scripting

shell programs

how to write pipe for finding out the login names and login time of the users whose login name begins with p. (1 Reply)
Discussion started by: rameshparsa
1 Replies

5. Solaris

Compiling programs

Hi guys i have posted a thread months ago and a guy called dukenuke or smething like that told me that i have to install Sun Studio if i want to be able to compile programs. I have installed Sun Studio 12 and put it in my PATH but no success compiling anything. when i download some source (tar.gz)... (2 Replies)
Discussion started by: saveka
2 Replies

6. UNIX for Dummies Questions & Answers

Are programs like sys_open( ) ,sys_read( ) et al examples of system level programs ?

Are the programs written on schedulers ,thread library , process management, memory management, et al called systems programs ? How are they different from the programs that implement functions like open() , printf() , scanf() , read() .. they have a prefix sys_open, sys_close, sys_read etc , right... (1 Reply)
Discussion started by: vishwamitra
1 Replies

7. UNIX for Advanced & Expert Users

check user installed programs

How do check the programs that the actual user of the computer installed. I do not care at all about the default programs that came with your distro of Linux, I only want the user installed programs. (1 Reply)
Discussion started by: cokedude
1 Replies

8. Shell Programming and Scripting

Installation of programs

I have installed a program and put the stuff on /usr/local/ However when I run a script it gives an error GMT Fatal Error: /home/chrisd/Dimech/GMT4.5.2/share/PS_font_info.d: No such file or directory (1 Reply)
Discussion started by: kristinu
1 Replies

9. Programming

Makefiles for different programs

I have several programs in several directories and want to use make to build the executables. What I have done is to put the main programs in their own directory together with a makefile to build the program. Then I am thinking of having another makefile residing in the directory above so I can run... (1 Reply)
Discussion started by: kristinu
1 Replies

10. UNIX for Dummies Questions & Answers

Difference between inbuilt suid programs and user defined root suid programs under bash shell?

Hey guys, Suppose i run passwd via bash shell. It is a suid program, which temporarily runs as root(owner) and modifies the user entries. However, when i write a C file and give 4755 permission and root ownership to the 'a.out' file , it doesn't run as root in bash shell. I verified this by... (2 Replies)
Discussion started by: syncmaster
2 Replies
CASPERD(8)						    BSD System Manager's Manual 						CASPERD(8)

NAME
casperd -- Capability Services friendly daemon SYNOPSIS
casperd [-Fhv] [-D servconfdir] [-P pidfile] [-S sockpath] [-Fhv] [-D servconfdir] [-P pidfile] [-S sockpath] DESCRIPTION
The casperd daemon hosts various services that can be accessed through libcapsicum's capabilities by programs running in sandboxes. For example it is prohibited to send UDP packets to arbitrary destinations when operating in capability mode, which makes DNS resolution impossi- ble. To make it possible the casperd daemon provides the system.dns service that proxies DNS resolution requests through a dedicated, non- sandboxed process provided by casperd. The casperd daemon can be started with the following command line arguments: -D servconfdir Specify alternative location of the service configuration directory. The default location is /etc/casper/. -F Start the casperd daemon in the foreground. By default casperd starts in the background. -h Print the casperd usage message. -P pidfile Specify alternative location of a file where main process PID will be stored. The default location is /var/run/casperd.pid. -S sockpath Specify alternative location of the unix(4) domain socket used to connect to the casperd daemon. The default location is /var/run/casper. -v Print or log verbose/debugging information. This option can be specified multiple times to raise the verbosity level. FILES
/etc/casper/ The configuration directory for casperd services. /var/run/casper unix(4) domain socket used to connect to the casperd daemon. /var/run/casperd.pid The default location of the casperd PID file. EXIT STATUS
The casperd daemon exits 0 on success, and >0 if an error occurs. SEE ALSO
cap_enter(2), libcapsicum(3), pidfile(3), capsicum(4), unix(4) AUTHORS
The casperd was implemented by Pawel Jakub Dawidek <pawel@dawidek.net> under sponsorship from the FreeBSD Foundation. BSD
October 26, 2013 BSD
All times are GMT -4. The time now is 05:02 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy