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


ADVERTISEMENT

General :: Wrote A Program That Multiplies 2 Matrices Using Multi-threads And Another One Using Multiple Processes And Shared Memory?

Sep 22, 2010

I wrote a program that multiplies 2 matrices using multi-threads and another one using multiple processes and shared memory. Both in C.I need to find the total memory usage of these programs. I know of the top command, but when my matrices are relatively small they don't even show up on top because they complete so fast, how can I find the memory usage for these instances?Also, how can I find the total turnaround time of my programs

View 1 Replies View Related

Programming :: Write A Program In C That Can Sniff Packets From Ethernet And Distinguish RTP Packets From Non-RTP Packets?

Aug 30, 2010

i need to write a program in c that can sniff packets from Ethernet and distinguish RTP packets from Non-RTP packets, i have no idea what should i do

View 9 Replies View Related

General :: Distinguish Between SATA And ESATA?

Jul 20, 2011

In Linux is there a way to distinguish between two connected hard drives and tell which one is eSATA through shell or anyother way?

View 2 Replies View Related

General :: Distinguish Between Tab And Space In A File?

Mar 22, 2011

suppose in tab separated file with n columns and if in a column i put a value which is space separated .how can i able to find out a specific column..ie

NAME<TAB>ADDRESS<TAB>AGE
akhand jyoti<TAB>banglore<TAB>21
vijay<TAB>new delhi<TAB>22
ram kumar verma<TAB>ram nagar<TAB>43
..
..

now i want to print NAME column(or any column). how can i do that?

View 3 Replies View Related

General :: Processes And CPU 4-core - Which Core The Program Used?

Mar 26, 2011

I've a program that launches new processes, and wait for them to die before it exits. So, for example, my program is a process, and it launches 3 more processes, and when the 3 child processes end, it will exit.

As you see, at end of the example, the program used a total number of 4 processes.

1 - Now, I'm running this program in a CPU with 4 cores. This means that the program used each core for each process?

2 - How can I know which core the program used?

View 1 Replies View Related

General :: Ubuntu - Automatically Distinguish Difference Between Multiple HDDs ?

Feb 14, 2010

I'm running Ubuntu Server 9.10. I have two external USB HDDs. I use them each for different backup reasons. So certain data gets stored on one HDD, and different information gets stored on the other HDD.

I want to make a script that can look at the external HDD can determine which HDD it is, so that it can copy the proper information to it. Is there a way for Linux to determine this? Like if I see one HDD as /dev/sdc1, then unplug it and plug in the other HDD, should Linux see it as /dev/sdd1 or will it be /dev/sdc1?

I don't quite understand how it determines the /dev/sdxx values that it assigns to drives.

View 3 Replies View Related

Ubuntu :: Distinguish Between Tabs On Taskbar?

Oct 2, 2010

Currently the way tabs on the taskbar look (the bar at the bottom) make it a bit hard to distinguish between them. sometimes they all look like one big clump of text. its quite messy. when you look at something like the windows xp taskbar [URL] its much easier to see between them. I guess its also because the buttons look 3D in that they stick out a bit. Plus the choice of colours used for when you are on a tab helps.

How do I change/find a theme for this?

View 1 Replies View Related

CentOS 5 :: Distinguish Between What Caused A Shutdown?

May 8, 2010

I am running a server at home, and on rare occasion my server will shut down. Is there a logfile I can check to determine whether the server was shutdown due to a script on the computer, a power loss, or someone hitting the power button? I am not by any means a linux guru, but I know enough to get around.

View 9 Replies View Related

Software :: Application Doesn't Distinguish Between Different Input Ports

Feb 26, 2010

I working on a project, where a central unit (we call it System Controller ) should talk to several peripheral units on different input ports. The system controller have 4 RS485 ports, 1 RS232, 1 USB A, 1 USB B and a switch with 2 TCP/IP ports. The problem is that when the peripheral unit that is supposed to be connected to one of the two TCP/IP inputs isn't connected (which the system should be able to handle), the software thinks that data from the unit connected to the RS232 port is from the unit that should be connected to the TCP/IP.

The input peripherals are defined as:
#define CR_DEVICE "/dev/ttyS1" // ttyS1
#define SL_PORT "/dev/ttyUSB0"
#define BO_PORT ""

It is the last one which are supposed to receive from the TCP/IP port, and of course the first one which should receive data from the RS232 port.

View 6 Replies View Related

Slackware :: Make A Browser Distinguish Between Files And Folders?

Oct 22, 2010

I'm playing with apache (and to be quite honest have no idea what I'm doing at this stage!) and currently have a large number of files and folders on the sad little site. One thing that is really bothering me is that files and folders both appear the same. I'm not looking for anything fancy. Something like this is more than adequate. Right now there is simply a dot next to each item.

View 2 Replies View Related

Ubuntu Servers :: Unable To Distinguish Which Service To Use By The Protocol Information?

Mar 30, 2011

Just wondering, what happens when you have multiple server softwares listening to the same port? will it be able to distinguish which service to use by the protocol information, or is it setting it up for failure?

IE: http and ssh both listening to port 80.

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 :: 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 :: 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 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

General :: What Is The Default Nice Value For Processes

Nov 17, 2010

What is the default nice value for processes?The setpriority() function sets the nice value of a process, all processes in a process group, or all processes for a specified user to the specified value. If the process is multi-threaded, the nice value affects all threads in the process. The default nice value is 0; lower nice values cause more favorable scheduling.

View 2 Replies View Related

General :: Make A Script To Open A Program Then Operate Within That Program?

May 7, 2010

I am new to linux and am trying out script writing. I am using shell. How can I make a script to open a program then operate within that program?

View 5 Replies View Related







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