General :: Use Semaphore To Synchronize Processes?

Jul 20, 2010

If uses SEM_UNDO flag,a ERANGE error will appear,if not,the process can't release resource.

View 1 Replies


ADVERTISEMENT

Programming :: Semaphore Used Without The Initializing?

Nov 4, 2010

I am using semaphore.h I declared a variable of type sem_t. I am able to use the variable without even calling sem_init or sem_open, and it is working properly.if the variable is automatically assigned some value? Also would I run into any trouble doing so?

View 1 Replies View Related

Fedora :: System Crashes - Semaphore Timeout Period Expired

Nov 1, 2009

FC11, 2.6.30.9-90.fc11.i586

Code:
Message from syslogd@server at Nov 1 21:41:58 ...
kernel:invalid opcode: 0000 [#1] SMP

Message from syslogd@server at Nov 1 21:41:58 ...
kernel:last sysfs file: /sys/devices/virtual/vc/vcsa2/dev

Message from syslogd@server at Nov 1 21:41:58 ...
kernel:Process kswapd0 (pid: 22, ti=dfa28000 task=dfa20ca0 task.ti=dfa28000)

Message from syslogd@server at Nov 1 21:41:58 ...
kernel:Stack:

Message from syslogd@server at Nov 1 21:41:58 ...
kernel: 00000002 00000001 c117a740 c12f52a0 c103ba20 c103ba60 c103baa0 c110a600

Message from syslogd@server at Nov 1 21:41:58 ...
kernel: c110a640 c110a6e0 c136f800 c10ebc40 c10ebc60 c10ebc80 c114e2e0 c114e260

Message from syslogd@server at Nov 1 21:41:58 ...
kernel:Call Trace:

Message from syslogd@server at Nov 1 21:41:58 ...
kernel: [<c048bf17>] ? shrink_list+0x24d/0x4e1

Message from syslogd@server at Nov 1 21:41:58 ...
kernel: [<c048893d>] ? get_dirty_limits+0x1f/0x2e1

Message from syslogd@server at Nov 1 21:41:58 ...
kernel: [<c0423803>] ? set_next_entity+0xa0/0x10c

Message from syslogd@server at Nov 1 21:41:58 ...
kernel: [<c0402286>] ? __switch_to+0x78/0xfb

Message from syslogd@server at Nov 1 21:41:58 ...
kernel: [<c042c374>] ? finish_task_switch+0x8d/0xa7

Message from syslogd@server at Nov 1 21:41:58 ...
kernel: [<c048c3c1>] ? shrink_zone+0x216/0x289

Message from syslogd@server at Nov 1 21:41:58 ...
kernel: [<c048c8dc>] ? kswapd+0x369/0x51b

Message from syslogd@server at Nov 1 21:41:58 ...
kernel: [<c048b14e>] ? isolate_pages_global+0x0/0x19b

Message from syslogd@server at Nov 1 21:41:58 ...
kernel: [<c044065d>] ? autoremove_wake_function+0x0/0x34

Message from syslogd@server at Nov 1 21:41:58 ...
kernel: [<c0422947>] ? complete+0x39/0x43

Message from syslogd@server at Nov 1 21:41:58 ...
kernel: [<c048c573>] ? kswapd+0x0/0x51b

Message from syslogd@server at Nov 1 21:41:58 ...
kernel: [<c048c573>] ? kswapd+0x0/0x51b

Message from syslogd@server at Nov 1 21:41:58 ...
kernel: [<c0440365>] ? kthread+0x4b/0x6f

Message from syslogd@server at Nov 1 21:41:58 ...
kernel: [<c044031a>] ? kthread+0x0/0x6f

Message from syslogd@server at Nov 1 21:41:58 ...
kernel: [<c0403f87>] ? kernel_thread_helper+0x7/0x10

Message from syslogd@server at Nov 1 21:41:58 ...
kernel:Code: f6 43 ea 01 75 24 8b 85 78 ff ff ff f6 40 08 40 0f 84 63 03 00 00 89 f0 e8 88 14 01 00 85 c0 0f 84 2d 03 00 00 bf 01 00 00 00 89 <f0> e8 db f0 ff ff 89 85 7c ff ff ff 8b 46 08 85 c0 78 2b 83 bd

Message from syslogd@server at Nov 1 21:41:58 ...
kernel:EIP: [<c048b90e>] shrink_page_list+0x1b0/0x56c SS:ESP 0068:dfa29d80

The semaphore timeout period has expired.

View 1 Replies View Related

General :: Synchronize Two Folders ?

Jun 30, 2010

I have made a backup of my files on a remote server and I'd like to maintain that backup using rsync. The problem is that the timestamps don't match perfectly between the source and the backup.

What can I do? I'd rather not replace all the files in my backup because there is so much data it would take a very very long time.

Is there perhaps a way to compare checksums and then update the timestamps? Both are low power boxes with no GUI and only BusyBox CLI access.

View 10 Replies View Related

General :: Synchronize System Changes On Two Computers?

Aug 22, 2010

I have two computers with Ubuntu 10.10 on them, a desktop and a laptop. I have two options for handling them:
Try and keep them the same
Accept that they have different 'personalities' and branch off their on way

However, I've chosen the first option because I like to keep my files and settings the same on both computers. I am in the process of extracting a tar archive I made of my entire desktop's hard drive (9.7GiB) onto my laptop, so after this is done they will be exactly the same. However, upon turning the laptop on with my freshly-copied system, things will become different. If I take the laptop to school, for example, and do stuff there, then come back home, and do stuff on my desktop, how can I sync these computers (both ways!) with the new changes at the end of the day/week/whatever?

View 2 Replies View Related

General :: Ssh: Continuously Synchronize Files, One Way?

Aug 1, 2011

Scenario: An IDE is set up on a Linux desktop box, editing PHP files locally. Every time I save a file, I want this change to appear on the linux server where Apache is running. The server has ssh (and samba and nfs for that matter).As a reference, when I edited files on Windows, I finally came over WinSCP as the exact tool I needed - WinSCP have just this feature present, with initial synch and then continuous update, using the filesystem watch service: "Keep Remote Directory up to Date".

On Linux, one could argue that sshfs could be employed to sidestep the need for synchronization entirely. On windows, a samba-share would do the same. However, I want the IDE to work with local files (on a SSD disk!), not having to go over the network to do PHP indexing and whatnots, which takes ages.But sshfs might be a part of the solution nevertheless - so that the continuous synchronization just needed to be done between two local directories.

View 5 Replies View Related

General :: Synchronize Files With Ftp Server?

Jan 30, 2011

what is the best way to synchronize files with ftp server

and I wnat to do this automaticlly

View 14 Replies View Related

General :: Synchronize The Time Of VM Server With Ntpd?

Mar 22, 2010

I am trying to synchronize the time of my VM server with ntpd. I have the following configuration. And in the /etc/ntp.conf, I have the following line:

restrict default ignore
restrict 127.0.0.1.
server time1.server
server time2.server

Whenever I have this line, the erver is not able to synchronize its time... So far as I understood, this line prevents other servers using this machine as a time server. And the second line says to allow localhost to use as time server. But why do I need to use its own time server when I have specified to use time1.server and time2.server ? ( firewall for tcp and udp ports 123 is open)

However, when I replace the first line of the configuration with the following line, it works. restrict default kod nomodify notrap noquery But with this, i am allowing other servers to use this server a ntp (which I wouldn't like to). Why this machine tries to use ntp server of its own (to snyc time) and why it is not working though i have the entry "restrict 127.0.0.1" ??

View 1 Replies View Related

General :: Uncheck Option To Synchronize Clock With UTC?

Apr 7, 2011

how to uncheck option to synchronize clock with UTC. This option is being asked at installation time. I couldn't remember text correctly but above text will give you hint. how can I uncheck that option using command.

View 4 Replies View Related

General :: Synchronize The Contacts Folder In Thunderbird?

Mar 22, 2011

I use Thunderbird in different computers so I configured it so that the datas are on an external drive. It works fine except that it seems that the contacts are still saved on the different computers and not on the external drive. It is strange since I have all datas for each profile on my external drive and all Mail and folders are there. I use different versions of Thunderbird (3.1 and under). how I could also have my contacts datas on my external drive?

View 2 Replies View Related

General :: Need To Synchronize Local And Remote Directories In Real Time

May 18, 2010

I'd like to have a copy of a web site on my local drive. Then when I make changes to that copy, have those changes automatically updated on the site's server. Ideally I'd like to tell it to only do this for certain file types. Does anybody know of a way to do this with Linux?

View 2 Replies View Related

General :: How To Synchronize Clock In Antix To Computer Time Zone

May 10, 2010

I just installed antix. It asked for time zones and I set all of that up but it is 3hrs off. My computer clock is correct, why can't I just set up antix to recognize my computer clock? Or why doesn't it just use that as a default?

View 7 Replies View Related

General :: NTPD Server Configuration - Synchronize Failed Error

Mar 15, 2010

How will configure ntpd server? I tried to do it but I am used to get synchronize failed error.

View 2 Replies View Related

General :: Setup Server To Automatically Synchronize Its Server Clocks?

Oct 5, 2009

How can I setup my Linux server to automatically synchronize its server clocks? We need to ensure our server clocks are set to the correct time always.

View 2 Replies View Related

General :: What Is The Maximum No Of Processes That Can Be Run

Jul 23, 2010

I want to know what is the maximum no of processes that can be run in Linux ,as it is a multitasking so what is the limit of this.

some one told me that 8192 but why this not 10000 or 500 why 8192.

View 8 Replies View Related

General :: Cannot Get Rid Of Xterm Processes

Jul 26, 2010

I had this error when installing and running a vncserver before, which I have now removed. However, the xterm's seem to remain in the system and are regenerating themselves. Should the pid IDs stay the same each time I run this?

Code:
[root nxserver]# pidof xterm
15034 15033 15032 15031 15030 15029 15028 15027 15026
[root nxserver]# pidof xterm
15044 15043 15042 15041 15040 15039 15038 15037 15036

[Code].....

View 10 Replies View Related

General :: How To Know What Processes Are Running

Jun 6, 2010

GNU/linux kernel 2.6, Slackware 12.0.Hi:How do I know what processes are running?

View 6 Replies View Related

General :: How To Monitor Some Processes

Apr 30, 2011

I need to create a small list of processes in a monitor.conf file. A shell script needs to check the status of these processes and restart if they are down. This shell script needs to be run every couple of minutes.

The output of the shell script needs to be recorded in a log file.

So far I have created a blank monitor.conf file. I have gotten the shell script to automatically updated every couple of minutes The Shell script also sends some default test information to the log file.

how I go about doing this part ? A shell script needs to check the status of these processes and restart if they are down.

I have put in the conf file the below commands but I am not sure if this is right.

ps ax | grep httpd
ps ax | grep apache

I also dont know if the shell script should read from the conf file or if the conf file should send information to the shell script file.

View 5 Replies View Related

General :: Show Only The Processes That Use More Than 10% Of The Cpu?

Apr 24, 2011

I am trying to show only the processes that use more than 10% of the cpu. I have managed to get it to show the processes in use using:

ps -eo pcpu,cpu,nice,state,cputime,args.

Then I am unsure how to sort this information so it only shows over 10%?

View 3 Replies View Related

General :: Change Priorities Of ALL Processes?

Jan 28, 2010

I know that you can modify the nice value of a particular process as follows:renice 19 -p 4567However, now I would be interested to set the renice value of ALL active processes.I am coming from the Win world so what I tried warenice 19 -p *Of course it is not working... Anyone a quick solution how to do that in Linux?

View 1 Replies View Related

General :: How To Log All Processes Launched And Arguments

Dec 16, 2010

I would like to get a log of all processes that are launched with the time that they were launched and the arguments they were launched with. Is this possible in Linux?

View 3 Replies View Related

General :: Signal Communication Between The Processes?

Sep 20, 2010

I am writing a code which communicates between 2 processes created by fork() statement. Parent reads a file and write the data into a shared memory and sends a signal to the child. The child then receives a signal from the parent to start reading. After finishing the read operation the child sends a signal to the parent asking it to resume its action. Some things are going wrong in my code.

1. segmentation error in memcpy() statement.
2. terminal hangs after running the code.
3. Synchronization problem between processes..

Code: #include <stdio.h>
#include <sys/types.h>
#include <wait.h>
#include <unistd.h>

[code].....

View 4 Replies View Related

General :: Distinguish Different Processes Of The Same Program?

May 22, 2010

First I create a named pipe at /tmp/.pipe by

Code:
mkfifo /tmp/.pipe
which is then used in a shell script called A.sh like this

[code]....

View 1 Replies View Related

General :: How To Monitor CPU / RAM Usage And Top Processes

Mar 18, 2010

I have a question. I want to monitor
- CPU usage daily
- RAM usage daily
- Harddisk Space
- top processes
- hardware failure

What commands do I need to run to output the result to a log file? I know there are solutions both paid and free, but my company does not allow. they want linux built in commands or methods to do it. I do not know bash scripting. I know some commands like "df -h" to monitor harddisk space but not sure on the other stuffs.

View 9 Replies View Related

General :: Getting The Multi-processes Memory Used?

Sep 2, 2010

The following code is for monitoring the memory used by apache processes. But I got a problem that the data I got by this script is much larger than the physical memory. It was said that there are some libraries used simultaneously by many processes, so the data I got has some double counted part. Because apache has many httpd processes.

Anyone have an idea of getting the multi-processes memory used?

Code:
#!/bin/sh
#G.sh 20100813
USAGE="Usage: $0 processName"

[Code].....

View 14 Replies View Related

General :: Real Time Processes ?

Dec 7, 2009

I've got the following problem:

1. I start two bash windows

2. In one of them I start a script test1:

Code:

This script puts a natural number 5 times a second.

3. Then in the second bash window I type (as root):

Code:

The script test2 looks as follows:

Code:

While true; do
true;
done

During the following 15 seconds test2 is the process with the highest real-time priority. As far as I know the script doesn't perform any system calls so it shouldn't be suspended even for a minimal timeslice. My question is: why the process test1 manages to put a few numbers on the screen before test2 stops. I thought that test2 would exclusivly own the processor for 15 seconds.

View 8 Replies View Related

General :: Ftp Processes - How To Kill Them With A Cron

Dec 14, 2010

if i do a

ps aux | grep ftp

that would show me at least any active ftp connects started with the ftp command, right? Is there then a way to use that to somehow kill any stuck sessions that are older than an hour?

View 9 Replies View Related

General :: How To Count How Many Of Processes Are Running

Nov 3, 2010

I list all the instances of a running process my doing:ps -ef | grep myprogramThis lists all them.how can I simply output a count of how many are running?

View 2 Replies View Related

General :: Processes With Effective User Name Or ID

May 21, 2009

I am studying for the LPIC-1 exam, and reading a book that they recommend: "Introduction to Linux: A Hands-on Guide", by Machtelt Garrels. There's one question on the 4th chapter (Processes), that I found confusing: Question: Based on process entries in /proc, owned by your UID, how would you work to find out which processes these actually represent?

What does he mean? If I run the command (considering that my username is sl33p):
Code:
$ps -u sl33p
...gives me the right answer?

The ps man page says:
-u userlist
Select by effective user ID (EUID) or name.

This selects the processes whose effective user name or ID is in userlist. The effective user ID describes the user whose file access permissions are used by the process (see geteuid(2)). Identical to U and --user.

View 8 Replies View Related

General :: Sharing Resources Across Processes ?

Jul 7, 2010

How would I demonstrate that sensitive application resources are not shared across processes that are owned by different users?

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved