Sponsored Content
Full Discussion: making use of a Semaphore
Top Forums Shell Programming and Scripting making use of a Semaphore Post 38908 by FDavid on Wednesday 30th of July 2003 06:29:31 AM
Old 07-30-2003
Java An example

i have a c menu script in csh that has the following functions: sort, grep, append. two of these are my client files. i have a data server file that these client files can perform their functions on. The semaphore must ensure mutual exclusion when both clients attempt to perform a function at the same time.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

semaphore

hi, is there any command where we can monitor semaphores? (1 Reply)
Discussion started by: yls177
1 Replies

2. UNIX for Dummies Questions & Answers

Semaphore

Hi, I'm new to UNIX. I need to know what's a semaphore Do reply. Thanks VJ (3 Replies)
Discussion started by: vjsony
3 Replies

3. Programming

Example for use of kernel semaphore

Hi friends I'm doing a project and in that I need to use kernel semaphore but I'm not very clear about how to use it. I've used system V semaphore. What I find difficult to understand is that in system V semaphore, a semaphore set is registered to the system (the semid returned from semget call... (3 Replies)
Discussion started by: Rakesh Ranjan
3 Replies

4. Shell Programming and Scripting

Semaphore

Hi, I am looking to use a semaphore for the first time in one of my scripts. I am just wondering if there are any simple examples or tutorials around? I am a beginner so the simpler the better :) Thanks -Jaken (2 Replies)
Discussion started by: Jaken
2 Replies

5. UNIX for Dummies Questions & Answers

semaphore

what is semaphore? can any body explain it in a more simple way than the manual ?? replies appreciated Regards raguram R (7 Replies)
Discussion started by: raguramtgr
7 Replies

6. Programming

Semaphore

In my server code there is a thread per client... The server call accept() and after that start the thread. So there is a thread for client that save in RAM the client's message, that will be send to other clients. Now in RAM I have created a shared memory in which thread read and write(save)... (2 Replies)
Discussion started by: italian_boy
2 Replies

7. Shell Programming and Scripting

semaphore

Control two exclusively shared resources(semaphore). The two resources are two files. The producer will write even numbers to one file, and odd numbers to another one. The consumer respectively reads from each file until it gets 5 even numbers and 5 odd numbers. Can any one help me with the... (0 Replies)
Discussion started by: gokult
0 Replies

8. Programming

Semaphore

If I create a semaphore and then I fork a number of child processes then all the child process use that same semaphore. Since the process address spaces are different rfom each other then how all the child process are able to access the same semaphore? I understand that semaphore/mutex is at os... (0 Replies)
Discussion started by: rupeshkp728
0 Replies

9. Solaris

Semaphore

Can anyone tell me abt the Semaphore concept and what is semaphore??? is semaphore id is associated in terms as in resources like semaphore id 1 indicates cpu share unit is given and semaphore id 2 will indicate abt the memore or semaphore id 3 will tell us the i/o components (1 Reply)
Discussion started by: aarjun07
1 Replies

10. UNIX for Beginners Questions & Answers

Semaphore

I was asked to add this piece of code to a c program which I will execute through the shell: for(long i = 0; i < NITER; i++) { sem_wait( &sema); count++; sem_post( &sema); } I didn't get it, which is the critical section ? if it's "count++" how would a thread wake up in order to enter it... (1 Reply)
Discussion started by: uniran
1 Replies
CLIENTUPDATE(1) 					      General Commands Manual						   CLIENTUPDATE(1)

NAME
clientupdate - Xymon client update utility SYNOPSIS
clientupdate [options] DESCRIPTION
clientupdate is part of the Xymon client. It is responsible for updating an existing client installation from a central repository of client packages stored on the Xymon server. When the Xymon client sends a normal client report to the Xymon server, the server responds with the section of the client-local.cfg(5) file that is relevant to this client. Included in this may be a "clientversion" value. The clientversion received from the server is com- pared against the current clientversion installed on the client, as determined by the contents of the $BBHOME/etc/clientversion.cfg file. If the two versions are not identical, clientupdate is launched to update the client installation. OPTIONS
--level Report the current clientversion. --update=NEWVERSION Attempt to update the client to NEWVERSION by fetching this version of the client software from the Xymon server. --reexec Used internally during the update process, see OPERATION below. --remove-self Used internally during the update process. This option causes the running clientupdate utility to delete itself - it is used during the update to purge a temporary copy of the clientupdate utility that is installed in $BBTMP. USING CLIENTUPDATE IN HOBBIT
To manage updating clients without having to logon to each server, you can use the clientupdate utility. This is how you setup the release of a new client version. Create the new client Setup the new client $BBHOME directory, e.g. by copying an existing client installation to an empty directory and modifying it for your needs. It is a good idea to delete all files in the tmp/ and logs/ directories, since there is no need to copy these over to all of the clients. Pay attention to the etc/ files, and make sure that they are suitable for the systems where you want to deploy this new client. You can add files - e.g. extension scripts in the ext/ directory - but the clientupdate utility cannot delete or rename files. Package the client When your new client software is ready, create a tar-file of the new client. All files in the tar archive must have filenames rela- tive to the clients' $BBHOME (usually, ~xymon/client/). Save the tarfile on the Xymon server in ~xymon/server/download/some- file.tar. Dont compress it. It is recommended that you use some sort of operating-system and version-numbering scheme for the filename, but you can choose whatever filename suits you - the only requirement is that it must end with ".tar". The part of the filename preceding ".tar" is what Xymon will use as the "clientversion" ID. Configure which hosts receive the new client In the client-local.cfg(5) file, you must now setup a clientversion:ID line where the ID matches the filename you used for the tar- file. So if you have packaged the new client into the file linux.v2.tar, then the corresponding entry in client-local.cfg would be clientversion:linux.v2. Wait for hobbitd to reload client-local.cfg hobbitd will automatically reload the client-local.cfg file after at most 10 minutes. If you want to force an immediate reload, send a SIGHUP signal to the hobbitd process. Wait for the client to update The next time the client contacts the Xymon server to send the client data, it will notice the new clientversion setting in client- local.cfg, and will run clientupdate to install the new client software. So when the client runs the next time, it will use the new client software. OPERATION
clientupdate runs in two steps: Re-exec step The first step is when clientupdate is first invoked from the hobbitclient.sh script with the "--re-exec" option. This step copies the clientupdate program from $BBHOME/bin/ to a temporary file in the $BBTMP directory. This is to avoid conflicts when the update procedure installs a new version of the clientupdate utility itself. Upon completion of this step, the clientupdate utility automat- ically launches the next step by running the program from the file in $BBTMP. Update step The second step downloads the new client software from the Xymon server. The new software must be packed into a tar file, which clientupdate then unpacks into the $BBHOME directory. ENVIRONMENT VARIABLES
clientupdate uses several of the standard Xymon environment variables, including BBHOME and BBTMP. SEE ALSO
xymon(7), bb(1), client-local.cfg(5) Xymon Version 4.2.3: 4 Feb 2009 CLIENTUPDATE(1)
All times are GMT -4. The time now is 05:22 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy