Programming :: Changing Priority Using Nice()

Oct 11, 2010

I am trying to change the priority of child using nice() but still it runs first.

Code:
#include <stdio.h>
main(){
int pid,i,retnice ;

[Code]....

View 2 Replies


ADVERTISEMENT

Ubuntu :: Change Nice Priority At Launch?

Jan 12, 2010

I'm currently running on a really old computer with one proc and little memory. It's just enough to get skype running but it only works well enough if I change the nice level to -5 or lower. Now the person that uses skype in the house is really the wife, I don't want to teach her how to open htop in command line, fine the pid and then use the correct command to change the nice.What I am looking for is a script (sorry I don't know thing one about programming/scripting) that will change the nice priority periodically for all pid that are skype. This way call processes will get reniced as well. I know better then to run it as root/sudo, but I am at a loss (even searches came up with not much) on how to do this.

View 1 Replies View Related

General :: X: Warning; Priority Set To -1 Instead Of Requested Priority 0?

Dec 9, 2010

I have BT4 as an iso image and start it up by booting from cd, when i try the command root@bt~:startx it comes up with this fatal error. what can i do to get this work? and of course im new at this.

View 5 Replies View Related

Programming :: Change Priority When Creating New Thread?

Feb 21, 2010

I have created an error logger thread in my application using pthread_create(), I want this thread to have a lower priority than my application's priority so that the application would run properly. Is there an easy way to do this? I know that we can change priority for thread created with policies FIFO or RR, since I don't set the policy for my application, I don't know what to set for my thread.

View 4 Replies View Related

Programming :: Need To Find Appropriate Thread Scheduling And Priority

Sep 9, 2009

I am new to thread programming. I need to generate one thread in one process using posix thread. Which scheduling and priority do i need to use? I want to generate the thread with the lowest priority. As i know there are 3 scheduling policy available SCHED_FIFO, SCHED_RR or SCHED_OTHAR.

View 1 Replies View Related

Programming :: Processor Priority Level For Algorithm For Buffer Allocation

Jan 9, 2010

The algorithm for reading and writing disk blocks use the algorithm getblk to allocate buffers from the pool. In the algorithm getblk, if the kernel removes a buffer from the free list, it must raise the processor priority level to block out interrupts before checking the free list. Why ?Where can i find the C implementation of the above algorithm for buffer allocation in the linux source code ?

View 1 Replies View Related

Programming :: Changing Ownership Of File

Aug 4, 2010

I am running a shell script as the user "redhatuser01" and this script creates a files in the home directory of another user "redhatuser02" (/home/redhatuser02/sample.txt) but the ownership of this file is currently "redhatuser01". How can i change the "ownership of this file to the user "redhatuser02"? (My constraint is that I cannot sudo as redhatuser2 and create the file).

View 5 Replies View Related

Programming :: Print Message When Changing Directories

Jul 21, 2010

I need some direction on a small scripting question. I've been doing some development and storing the code on a network drive with multiple user access. My development is getting complex enough that it is time to set up a svn repo for it. I would like to set up a little script (if possible) that prints a message/reminder to whomever is accessing the code directory stating that the code is ultimately stored in svn and any changes need to be checked in, etc. Is there a way to have linux print a message to the screen based on a 'cd /specific_dir/' command? So far google is mum on the topic. Using Debian and bash shell.

View 5 Replies View Related

Programming :: Changing Log Script To Write To Top Of File

Apr 5, 2011

I'm running a simple backup and log script that is cronjobed to run twice a day. So currently, when new data is added to the log, its added to the direct bottom of the log file. However, I would like to have it printed to the very top of the log. The code is attached, I can't quote it in here because I am a new user and the system thinks I have url's in it, when they are just paths.

View 2 Replies View Related

Programming :: Virtual Accounts - Changing The Prompt?

May 21, 2011

I need to write a bash script that will allow me to manage my "virtual network" (in reality just a bunch of directories and files). I need to obtain something like : I have my own command 'connect'. We can use it in two different modes: user and admin.If I type 'connect adashiu virtual_machine_name, computer will ask about password, if password is correct he will change a prompt to :

adashiu_at_virtual_machine_name >

after that user can start to use commands reserved only for user mode.Analogically with admin mode: prompt 'admin >' and administrator can only use bunch of commands reserved for him.

View 1 Replies View Related

Programming :: Changing Pattern From String In Perl

Jun 3, 2011

I am new to perl and not able to understand all the pattern matching.

I using this script to send the status to another Nagios server using ncsa. Nsca don't transmit "()" So I need to remove them before sending.

Currently I am using

Code:

for the string

Quote:

This is working fine but its is not working when there is change inside the bracket for e.g (6290)

I want to change this code to work for any change with in the brackets.

View 14 Replies View Related

Programming :: Ls -R Without Changing Access Time/date?

Aug 31, 2010

I am using cygwin in order to test a bash script that uses the ls -R command. When I use this, the access date of the subfolders are changed, and I need them to remain what they were before the command was run. I don't have access to a legitimate Linux system, so I'm not sure if this is the fault of cygwin or the ls command. The script is being used to find the last access date of all files underneath several subfolders and then return the latest date found in each subfolder as the last access date for that subfolder. For some reason, some of these folders have files in them that are newer than the folder's last access date, so the script is meant to give us a list of the true last access date for these folders.

View 5 Replies View Related

Programming :: In C Program The Value Of An Integer Variable Is Changing Rapidly

May 12, 2010

In a c program the value of an integer variable is changing rapidly. I have to get the value of that variable at a particular instant from another program. How can i do it without using a file?

When i tried with extern variable as

I execute the both .c file from 2 terminals but got only value 0 printed for both var_a and var_b all the time .

View 4 Replies View Related

Programming :: Changing Color Of Output From Bash Script?

Apr 22, 2010

I am writing a bash script that utilizes the output of another script (which I will refer to as script#2.) Script#2 is not owned by me, I cannot modify it. All of the output from script#2 is blue, which makes it difficult for me to read.

I would like to have the output of it changed to grey. Is there a way I can do that in my script? A command I can pipe the output to?

Edit: One other question related to this. I put a trap function in my script that works well. Script#2 essentially runs a tail -f. When I ctrl+c to stop it, it stops script#2 and never calls the trap in my script. Is there any way I can work around that?

View 3 Replies View Related

Programming :: Changing Home Page Url For Firefox Using Script

Mar 15, 2010

My Debian Lenny's Firefox prefs.js file looks like this:

Code:

Now I am trying to set the home page i.e. browser.startup.homepage variable (in red color) with my own URL using a script. Here is what I am trying to do but it is not working:

Code:

Note that the in the original file (prefs.js), the URL could be set to *anything* and not necessarily www.abc.com. So I need to search for the variable user_pref("browser.startup.homepage" and then set the entire line with my own supplied line (with the desired URL).

View 4 Replies View Related

Programming :: Changing Shared Object File Default Place

Mar 27, 2010

I wanted to know how can I change the default place of shared object files of a program in a system. let me explain it better for you : I have an embedded computer with Linux OS that its file system is read only and I can not add any file to /usr /lib and ..... and I can just mount a SD memory card to it and copy all of my programs to it and run them from there as you understand I have two choices to choose, first make one big binary file for each program that I am doing it now and it is not a suitable solution and the second is finding the way to change default place of shared object file of my program.

View 1 Replies View Related

Programming :: Makefile: Change Compilation Flags By Changing Target Name

Nov 12, 2010

I'd like to create a target named "debug" or something similar which will use some special optimization flags useful when debugging (for example -ggdb). At the moment my makefile is neat (which I like) and looks like

Code:
SRC = $(wildcard *.cxx)
OBJ = $(SRC:.cxx=.o)
INCDIR = -I.
LIB = -lm

[Code]....

View 2 Replies View Related

Server :: Nice Smsgateway With GUI?

Feb 2, 2011

I am asked to look for a very nice sms gateway with a good GUI be it commercial or free. where can I find a nice smsgateway with GUI? I looked at kannel but it didn't mention any thing like GUI so am not sure I will go for it.

View 1 Replies View Related

Ubuntu :: 10.04.1: All 'nice' Levels At 0

Sep 30, 2010

I have freshly installed an Ubuntu 10.04.1 by internet.

All is running well, but my nice values are all set to 0. Is there a script that handles these at boot time? How can I reset them to "appropriate" or "normal" levels (e.g. not all at 0)? I know in other installs, my nice levels vary depending on the process and the user.

Attached is a screen shot of my gnome-system-monitor, and aside from init, which I had set to -15, all others are at 0.

Computer specifications:
Linux AMD-LNX000 2.6.32-25-generic #44-Ubuntu SMP Fri Sep 17 20:05:27 UTC 2010 x86_64 GNU/Linux
AMD Athlon 64 Processor 3000+

[Code]....

View 6 Replies View Related

Programming :: Bash : Searching For Info And Changing The Color Of Keywords In The Results?

May 5, 2011

(bare with me as I am sort of new with scripting) I am trying to figure out how to run a script that does a basic chkconfig and to get only those services that are running, but changing the color of "on" to red in my output file. Here is what I am working with so far:

Quote:

#/bin/bash
RED=$(tput setaf 1)
BLK=$(tput setaf 0)

[code]....

*I had to substitute a "-" and <colon_symbol> for ":" in front of the on's, because the forum thought they were smiley faces (i.e. n) how to make the "on" to be red while the rest of everything remains in black text. I have been trying to read up on sed and awk, but it is still pretty much a mystery to me right now. There will be other things in the output file that I wouldn't want a rogue "on" to be in red, so just the instances of "on" in that one chkconfig return.

View 4 Replies View Related

Fedora :: Since TeamSpeak 2 Doesn't Come In A Nice RPM Anywhere

Oct 21, 2010

Since TeamSpeak 2 doesn't come in a nice RPM anywhere, I am under the assumption that I have to go to TeamSpeak's website, download TS2, and install through their script. I did all of that, and I can successfully launch TeamSpeak, however there is no sound whatsoever. No mic, and no speakers either. TeamSpeak automatically forces mute microphone and mute headphones on me, and I can't uncheck them. Therefore, something must be wrong with TeamSpeak and my sound setup.

View 3 Replies View Related

OpenSUSE :: Any Nice Web Development Application?

May 3, 2010

is there any nice web development application?

View 6 Replies View Related

OpenSUSE :: All Applications Are Running At A Nice Value Of 19?

Feb 26, 2011

All my applications seem to be running at nice of 19 except bash and daemons which are running at 0. My understanding is that the default nice value is either 0 or 10 (forget which) but not 19.Ran search in /etc/sysconfig/ editor and no results for "nice" and looked at the bashrc files and again no lines contain "nice".

View 9 Replies View Related

Ubuntu :: Don't Get All Mail In One Nice Big File

Feb 1, 2011

I followed the tutorial on URL... on Ubuntu but I don't get all my mail in one nice big file instead, I get possibly every message, each one given a horrible filename URL..What could have gone wrong while following the tutorial?

View 3 Replies View Related

General :: Display The Nice Value Of A Process?

Aug 13, 2010

What is the command to display the nice value of a process?

View 4 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

Software :: Xpdf Won't Play Nice With UTF-8?

Jul 20, 2010

I use Vector Linux 6 (based on Slackware 12.1) and I set the encoding to UTF-8 because I use Spanish characters. The problem is that when I try to open files with accent marks, for instance, with xpdf they all look garbled. How can I get xpdf to display the names correctly?

View 9 Replies View Related

Programming :: Bash Script For Automatic Viewport Changing And Other WM Stuff (works With Compiz)?

Oct 18, 2010

I had to make for work a collectd based network monitoring system which displays data for each server in a fullscreen conky on different compiz viewports. I have to switch viewports automatically when the machine isn't operated (sorta screensaver) and also if i had to call attention in the case something bad happens, autoswitching should stop and the relevant viewport be showed up.This requires an interface to talk dynamically to the WM, which i've implemented in bash with support of the widely available "wmctrl" program.

Code:
http://paste2.org/p/1177045
Code:

[code]...

View 8 Replies View Related

Programming :: Changing A Line In A Config File While Installing The Program Using Bash Script

Jul 22, 2011

I am trying to write a bash script that installs a program fully automated for me. I am stuck at the one part where i need to change a line in one config file. I have tried various syntax for sed and none have worked. Maybe someone can suggest how to go about this. Since the line appears in the middle of the file, I can't use echo or cat. Also the file will be diffrent lengths depending on the install.

The line I need changed is:

I need that changed to:

the last syntax i tried is:

Yes this is for PNP4Nagios on centos 5.6 64bit. If i can get this figured out. I will be willing to post the whole thing for others to use. it will be used to install PNP after a working nagios install is done.

View 11 Replies View Related

Programming :: Compile C++ Program Without Changing #include Line & Header Files Not System?

Apr 3, 2011

I have C++ source code(*.cpp) files that expects it's header files in System's include folder which is/usr/include.The cpp files has include lines like this:

Code:
#include <some.h>
#include <another.h>

[code]...

View 3 Replies View Related







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