Programming :: Change The Resource Limits For A Specific Process?
Jun 26, 2010
I want to change the resource limits for a specific processOr to create a new process and give it limits as I want, There is a function setrlimit, Which is possible to change it but for a programmatic I want to apply it to another Process, The problem is that this function does not receive process ID for example. I read in most books on the subject of The Linux system programming
View 1 Replies
ADVERTISEMENT
Feb 9, 2011
I have the following inside /etc/security/limits.conf(I have specified root separately because * will not include it.)
user2 - core unlimited
* - core 0
root - core 0
[code]....
View 2 Replies
View Related
May 1, 2010
Trying to change to upper case first letter of every word over a specific column.
View 10 Replies
View Related
Mar 2, 2009
Is there a way of throttling a process resources, something akin to limits but for processes not users?ie I want processX to be restricted in the amount of memory it can consume. For process cpu I guess I can simply nice the process, but total memory consumption is my primary concern.
View 1 Replies
View Related
Feb 21, 2010
I'm writting a program that uses a USB webcam. Sometimes the program crashes and exits, but sometimes it crashes and becomes a zombie process, which I can't kill even with -9/-KILL signal. When that happens, all access to th USB webcam is totally interrupted and all attempts to communicate with it fail.I'm looking for a way to either force this process to terminate or to at least make it release the webcam so I can use it again. So far, the only way I've found to regain control of the camera is to reboot
View 2 Replies
View Related
Jan 30, 2011
I would like to limit any process from using more than 500 MB of RAM. AFAIK this is done using RSS in /etc/security/limits.conf but the process called gnome-panel apparently is using 618436 kB of VmRSS. How can this be ?
/etc/security/limits.conf
* hard rss 512000
username@debian:~$ cat /proc/3002/status
Name: gnome-panel
[code]...
View 2 Replies
View Related
Jan 17, 2009
I have an old-address-list file which is having around 1500 entries. I need to convert this addresses in to a specific format.
The old-address-list file>
# cat old-address-list-file
dn: CN=Muhammad Hadhi K.M,OU=IT Dept,OU=Example Company H.O,DC=example,DC=com
cn: Muhammad Hadhi K.M
[code]....
View 6 Replies
View Related
Apr 28, 2010
How i change the limits of e-mail sizes on the server. I have an e-mail server installed with CentOS3.
View 4 Replies
View Related
May 27, 2010
How to assign CPU and memory resource to a certain process? How to assign CPU and memory resource to a certain user?Let's assume the software is no limit for resource usage.Below is a description of my situation.dual 6 core, 32G memory, RHEL5.5 client with workstation option.I run a big computation (say process1). However, I found from KDE system guard the CPU and memory are not loaded as expected. below are numbers. user% system%process1 100 0.00and CPU idle 90%, memory free 97%
View 3 Replies
View Related
Dec 2, 2010
for example
else {
for fileDOC in $location/*.doc
do
[code]...
View 12 Replies
View Related
Jul 24, 2010
I need to search a bunch of files in a specific folder for a specific number and add all the numbers together to a total sum. I use Rsync everyday, everytime I run rsync i get a logfile (rsync output) witch contains the textstring "Total bytes sent: xxxxxx".
The "xxxxx" can vary in lenght. I need to extract the "xxxxxx" from each file and add the numbers together to a total size over a week or a month. Is this possible? And I wish to only use bash. One way of doing stuff at a time my friends .
View 5 Replies
View Related
Jul 19, 2010
I want to replace specific character in a file after every specific line. example as follows.
O 000000000000000000
A 111111111111111111
C 222222222222222222
[code]...
View 2 Replies
View Related
Jun 13, 2011
I'm using VLC v. 1.1.9 and when I try to change/add a new skin, the Interface, Skln Resource File box will not do anything. When I click Choose, nothing happens.I see this when I run vlc from the command line:
vlc
VLC media player 1.1.9 The Luggage (revision exported)
Blocked: call to unsetenv("DBUS_ACTIVATION_ADDRESS")
[code]....
View 4 Replies
View Related
Jul 19, 2010
Recently I use a program "pktlogdump" in IXP platform. But the system print an error message as follow:"error while loading shared libraries: libm.so.6: cannot open shared object file: No such file or directory".So where can I get this file? Or how can I get the resource file?
View 2 Replies
View Related
Mar 7, 2010
I'm working a program to implement a simple multi-process browser. The browser works by having a ROUTER process as the parent of everything else in the program. There's another process called the CONTROLLER which is part of where the user can input information. To tell the ROUTER to make a new tab in the browser the user activates a function from the CONTROLLER to send the create new tab information to the ROUTER:
Code:
void new_tab_created_cb(GtkButton *button, gpointer data)
{
[code]...
View 1 Replies
View Related
Apr 19, 2010
I want to be able to tell processes/programs somehow to use a specific nic. I have a laptop (used as dekstop) and want to make pidgin use my wireless. I have a gigabit wired connection and a wireless connection. I want to force pidgin to use the wireless connection. But more specifically, I just want to block pidgin from using eth0... how to go about that? I can't find anything that will block applications... I could block outside servers from communicating with eth0, but I don't want to do that.
View 14 Replies
View Related
May 28, 2010
I want to disallow one user using Solaris machine when some process is active. I will store the PID of my process. If that PID is alive then i do not want one specific user to use the machine.
View 1 Replies
View Related
Aug 23, 2010
I'm trying to write a script that involves storing a specific PID in a variable. I've got as far as: -
Code:
$PS_OUTPUT=ps -elf | grep <process name> | awk '{print $4}'
This stored the PID of the grep itself and the actual process I want. The output of
[code]...
View 6 Replies
View Related
May 6, 2009
I am working with a C++ program consisting of two threads. The first threads receives packets through an UDP unicast connection and stores them in a buffer. The second thread reads the packets from the buffer and sends them through an UDP multicast connection. Both use blocking sockets and share a common buffer and a linked list L1, which are protected by mutexes. The program seemed to work just fine, receiving a packet and sending it almost immediately, but started giving some trouble recently. The synchronization between both thread started failing, and I decided to use a non-blocking socket in the sending thread. As a consequence, sendto() doesn't work in some cases, causing an errno 11 (Resource unavailable).
[Code] ...
View 4 Replies
View Related
May 5, 2010
I am trying to develop a video resource manager in Linux.By that what I mean is, if two applications (may be running in two different machines) are trying to play videos, the video resources will be served by this video resource manager (running at a center location). Pardon me as I donot have much idea about video resource handling in Linux , first of all , it is feasible to have this kind of a layer, in between the applications and the available resource hardware.
Kindly give me some pointer as to how do I start? Pl. give me some reference URLs.
View 2 Replies
View Related
Apr 24, 2010
I've written a program for a class that my professor will be testing in various low memory environments to see how it behaves when the program runs out of memory. Is there a way I can simulate the execution in a low memory environment without creating a virtual machine?
View 1 Replies
View Related
Feb 11, 2011
I have a command that outputs as follows:
# lostjobs
user1 12983 1 0 Feb04 ? 00:00:00 dbr UT:msmenu
user1 18253 1 0 Feb09 ? 00:00:00 dbr UT:msmenu
[code]....
I know I can grab the ones with what I want to kill (which are the ones with question marks) with:
# lostjobs | grep ?
what I need to know is how can I loop through the results of the second one and kill them by id (the second column).
View 2 Replies
View Related
Jun 27, 2010
On my RHEL5 system one of my key file in one specific directory gets deleted when I start my application suite (having multiple processes). Is there some way to narrow down which specific process is deleting this file?
View 8 Replies
View Related
Nov 9, 2010
I have a shell script to identify whether the process is running or not. If the process is not running, then I execute another script file to run my application. Below is my script and saved this script as monitorprocess.sh Code: #!/bin/bash
result=$(ps -ef | grep -v grep | grep "applicationname.sh" | awk '{print $2}')
echo $result
if [ "$result" == "" ];
[code]...
View 4 Replies
View Related
Mar 31, 2011
Is there any difference in cpu usage for process in init.rc(runs automatic when boot is happened) and manually running process. Will these both have same priority by default...?
View 1 Replies
View Related
Nov 26, 2008
I tried googling but didn't get any answer for this.I have a process called "abc" and it is running with PID "123".I have a putty session opened with PID "999".I am giving kill -TERM 123 from putty session.My process "abc" before dying it should catch the PID of the terminal which provided TERM signal to it.Is there any way to find this out
View 2 Replies
View Related
Jul 30, 2010
Is there a way to bind specific programs to specific network devices (not IPs, since I have dynamic IPs)?
For example, I wish for irssi to route through eth0 and w3m to route through eth1. Keep in mind these devices have dynamic IPs, so I cannot attached them to an IP.
The solution cannot be accomplished through route since route pivots on IPs not devices.
View 1 Replies
View Related
Nov 9, 2010
I have a shell script to identify whether the process is running or not. If the process is not running, then I execute another script file to run my application. Below is my script and saved this script as monitorprocess.sh
Code:
#!/bin/bash
result=$(ps -ef | grep -v grep | grep "applicationname.sh" | awk '{print $2}')
[code]...
View 14 Replies
View Related
Mar 10, 2011
I want to kill parent process after "fork()" method. but if I kill parent process with "exit(0)" method, main() thread is terminated as well so child prosess doesn't work anymore. Is there any way to kill only parent process without affecting to child process?
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
[code]....
View 1 Replies
View Related
Dec 7, 2009
Consider the following code:
Code:
int main()
{
int i=0;
pid_t pid;
for(i=0;i<2;i++)
[code]....
I get the following output:
Parent: chid_pid=4356 i=0 parent's pid=4355
This is child 4356 i=0
This is child 4357 i=1
[code]....
I can observe instead of two children(as I expect) processes there are three. This is because child process 4356 creates its own child. Why all the messages of the type "This is child X i=Y" are concentrated one under another? How exactly fork works? Is affected by the fact that I have a dual-core processor?
View 3 Replies
View Related