Red Hat / Fedora :: What Happens When A Process Executes Unlink(".");

Feb 19, 2010

What happens when a process executes unlink(".");

What is the current directory of the process ? (Assume superuser permissions are given.)

View 1 Replies


ADVERTISEMENT

General :: RT Process Stuck As Runnable 'R' / But Never Executes

Jul 28, 2011

I have a hard to reproduce (seen a couple times in a month) issue where my program seems like it is hung (not increasing in cputime), however, it is in the runnable state and never gets to run. The cpus are 99% idle according to vmstat and the load is 5 (which is equal to the number of threads in my program that are in the R state) according to ps, and there are no processes on the system in the 'D' state. The other major oddity is that one of the migration threads has a cputime usage almost equal to the uptime of the system. Typically migration threads have a cputime on the order of seconds across hundreds of days of uptime, but in this case the migration thread has DAYS of cputime according to ps.

The last time this happened, I went around saving as much /proc/X information that I could into logs for referring to later, before I had to reboot the box to get it running back to normal. (because in this state, a kill -9 is not heeded by my program)Does anyone have any idea what could cause this? I am not sure if this is a scheduling bug or a bug in my program (the likelier case).I have a wealth of logs to look through if anyone can suggest something specific to look for.

View 4 Replies View Related

Ubuntu :: Part Of Boot Process Executes Just Before Login Screen?

Apr 12, 2011

In Ubuntu 10.10 I want to have a shell script execute on bootup after everything else is done, *just* before the computer gets to and sits at the login screen. I find this easy in CentOS/Red Hat. If I place my scripts in /etc/inittab near the end, right after the mingettys, that is PERFECT. But Ubuntu has no /etc/inittab and I have spent the past few days going over and over and OVER more info about Upstart and the rcX scripts and I can't seem to get it. Anything I place in an rcX script runs too late, only after the machine is past the login screen i.e. a human must log in first. And I would rather not have to enable auto-login. I've heard that Ubuntu will honor an /etc/inittab file if you create one, and it does, but that too runs too late, only after a human has logged in. Can anyone tell me where a script should be placed in Ubuntu to execute after all system initialization is done, but before human interaction is required?

View 3 Replies View Related

Red Hat / Fedora :: Excluding Unlink To A Particular File In Audit.rules?

Apr 11, 2011

I am running RHEL 5.4 Server (32-bit) and have my audit.rules file set up per a template that I am required to use. There is one particular rule that audit is auditing the unlink of files. With this set, my log files are filling up very fast, as there is a particular app that constantly touches/ deletes a couple of files, which the unlink is catching. Here is the audit rule:-a always,exit -F arch=b32 -S unlink -S unlinkat -S rename -S renameat -F auid>=500 -F auid!=4294967295 -k deleteI commented out the "-S unlink" and my logging returns to normal (as expected). For right now, I was wondering if there was a way to set this rule up to exclude these couple of files from what auditd is capturing?

View 1 Replies View Related

Fedora :: Making A Shortcut That Executes A Couple Commands At Once ?

Jul 14, 2011

I want to use a desktop icon shortcut that essentially does this...

Is there a way I can do this? I don't really want to create an alias because I just want it to be an icon I double click to do all of this. But if I have to create an alias in which it does these ocmmands then I use the shortcut to terminal... then it types the alias that is fine also.

View 1 Replies View Related

Software :: Unlink Action From Keycode ?

Jun 9, 2010

I am trying to unlink the action triggered by my fn-F5 key, which is a toggle wlan action.

I really don't know were this kind of action is defined, but I want to replace it by another one.

It should happen either by unlinking that action or by overriding.

The key is catched by HAL:

View 4 Replies View Related

General :: Hiding A File Using Unlink Command?

Feb 1, 2011

While googling for soft link and hard link i found this part

Code:
{
FILE *fp;
fp = fopen("some.hidden.file","w");
unlink("some.hidden.file"); /* deletes the filename part */
/* some.hidden.file no longer has a filename and is truely hidden */
fprintf(fp,"This data won't be found
"); /* access the data part */

[Code]...

View 9 Replies View Related

Red Hat :: Excluding Unlink To A Particular File In Audit.rules?

Apr 11, 2011

I am running RHEL 5.4 Server (32-bit) and have my audit.rules file set up per a template that I am required to use. There is one particular rule that audit is auditing the unlink of files. With this set, my log files are filling up very fast, as there is a particular app that constantly touches/ deletes a couple of files, which the unlink is catching. Here is the audit rule:-a always,exit -F arch=b32 -S unlink -S unlinkat -S rename -S renameat -F auid>=500 -F auid!=4294967295 -k deleteI commented out the "-S unlink" and my logging returns to normal (as expected). For right now, I was wondering if there was a way to set this rule up to exclude these couple of files from what auditd is capturing?

View 1 Replies View Related

General :: Unlink Com Port And REDHAT Installation Files?

Jun 1, 2011

I tried to link USB to com port. Mistakenly I managed to link to one USB several ports. How can I unlink them in order to have only one linked? This is how it looks like!

lrwxrwxrwx. 12 May 26 16:26 com03 -> /dev/ttyUSB0
lrwxrwxrwx. 12 May 26 16:17 com10 -> /dev/ttyUSB0
lrwxrwxrwx. 12 May 26 16:22 com2 -> /dev/ttyUSB0
lrwxrwxrwx. 12 May 26 16:26 com3 -> /dev/ttyUSB0
lrwxrwxrwx. 12 May 26 16:27 com4 -> /dev/ttyUSB0

And second question, I have installation files for Redhat(73, 8, 9). Can I install them to Fedora 14? If yes, could you? please, help me with commands?

View 1 Replies View Related

Red Hat / Fedora :: Command To Stop That File/process Or Is It Just Kill The Process To Stop The Process?

Nov 11, 2010

I've some file with .sh extensions that runs some softwares.Now,how do I stop running that filesI know we run the command ./start_tomcat.sh to start the apache.Is there any command to stop that file/process or is it just kill the process to stop the process

View 2 Replies View Related

Ubuntu :: How To Tell Which Binary Actually Executes

Apr 20, 2010

Is there a command that can tell me which binary actually executes for some program name? "whereis" seems to do something different.

Specifically, I am trying to hunt down and kill a python 2.6 installation that just won't die.

whereis just seems to be returning anything with "python" in its name, but I want to know which binary thinks it is python 2.6.5. (By the way, I've tried all the above manually, and it isn't any of them)

View 6 Replies View Related

Ubuntu :: Conky Startup Script Never Executes

May 6, 2010

I'm having trouble getting conky to boot friendly-like with the gwm. If I just set conky as a start up program, it floats above other windows, it seems to have loaded before the desktop actually did. So I googled it and found that many people use the conky shell scripts to make it sleep until the desktop load. I created one, made it executable, and restarted to see the effect and found that conky never launched at all (not visible, no running process).

Here is my startup shell script for conky:
Code:
#!/bin/bash
sleep 10 && conky;

This is how it should look if working properly. If I launch conky after login, it looks like this every time. [URL]. This is how it looks if I simply set it to open upon startup with no script. [URL]. If I try to open it with the script, I simply never see anything in conkys place. It seems like the script never executes. I've tried setting longer and shorter sleep times, but I never see so much as a single instance of conky running.

View 8 Replies View Related

Ubuntu :: Secondary Hd Permission Denied On All Executes?

Jun 7, 2011

I completely switched to Ubuntu 6 months ago. I kept my secondary sata hd as ntfs for a while but started having permission problems. I switched it to ext4 and that worked for a while but then it started having permission problems again. Specifically, I can't execute anything on that hd drive. I converted it to ext2 and it still didn't help. I have 2 executable modules that I moved up to the root directory to make this simple and they look like this:

tom@tom-desktop:/media/sda1$ ls -l
total 3088
-rwxr-xr-x 1 tom tom 3099451 2011-04-23 16:36 bochs
-rwxr-xr-x 1 tom tom 26064 2010-09-11 08:48 bzip2

[Code]...

View 6 Replies View Related

OpenSUSE :: Make A Shortcut In A Desktop That Executes A Program?

Nov 12, 2010

even though this is a simple task I always have problems to do this.I want to execute the following#!/bin/bashjava -jar JabRef-2.6.jaror in other words this is the command I use in konsole to make the application to launch.Then usully I try to create a desktop in the icon either by using a. create link to locationorb. create link to application.where I select as file the file myfile.sh that contains the two lines of code I posted above (see again below)
"#!/bin/bashjava -jar JabRef-2.6.jar"I do this file executable by using the chmod +x.Sometimes I think this works while others like now I only receive the cursor bouncing for sometime before it dissapears

View 4 Replies View Related

Ubuntu :: Script Executes Manually / Won't Execute With Cron

Jul 21, 2011

I've written a script that restarts the server of a game I play, giving you a 15 second notice. If I manually start this script, it works fine. invalid option say Server is restarting in 15 seconds-ne and it says this for every line in the rest of the script (substituting the correct phrases of course, but always starting at the "say" and ending with the "-ne")

View 9 Replies View Related

General :: Terminal Executes Mi Script To Create Vector

Dec 6, 2010

I am trying to create a script that creates a vector and displays it. I used the command inivec but it didn't work.

[code]...

How do I make it so the terminal executes mi script to create a vector. I know MV is the name and the output should be aa aa aa, but nothing?

View 3 Replies View Related

General :: How To Create Multiple Children Before Any Child Executes

Aug 27, 2010

Iv got an assignment to complete and I'm stuck at the basic level.

A part of the assigned problem is :

The main process will read the file, and will create N number of child processes (Where N is taken as input) as early as possible before all the children starts its execution. Before creation of each child, the main process should read the file to store all the required data in then corresponding data structure. Child processes should not read the file for getting their information.

As far as my knowledge about this , the child executes before the parent. How do I make the parent not pass the control to it's children before it finishes creating all the children?

View 3 Replies View Related

General :: Unix Script That Executes Sql Query In A While Loop?

Jan 8, 2011

I have a logfile which looks like:

tableabc 1786rows
tabledfg 8374rows
tablefhd 726rows

[code].......

Now i have to writ a script which takes this log as input and quesries the DB for each table. So,I want to: input the logfile
start a while loop.So,while read LINE This variable LINE would store the table name by CUT using a delimiter once the table name is ready it makes a connection to DB and queries the table for its rowcount writes the rowcount to an O/P file.

View 3 Replies View Related

Programming :: Script Which Logs Into Devices Over Ssh And Executes Commands?

Mar 23, 2010

I would like to make a script, where I specify my Cisco devices IP addresses as arguments to the script and then this script automatically logs into every one of them and does "show version" and "exit" in every Cisco device. I have public/private key authentication system with my Cisco devices- thats why I'm using ssh-agent and ssh-add. I did something like this:

Code:

#!/bin/bash
if [ -z $1 ]; then
echo USAGE:
echo "$0 IP1 IP2 IP3 IPn"

[code].......

However, it logs nicely into the first device(I'm able to execute IOS commands in this first Cisco device etc) and then does nothing further.

View 1 Replies View Related

CentOS 5 :: Scheduled Task That Executes A Shell Script?

Dec 17, 2009

I centos version 5 installed on server 2, and I want to make a scheduled task that executes a shell script.This script should copy some files and directories from one server to another. I do not use DRBD and Heartbeat.

View 1 Replies View Related

General :: Shell Script That Logs Into Another Machine And Executes Some Commands?

Jan 5, 2011

I am trying to write a script that connects to a server and executes some commands on there. Something like this:

#!/bin/sh
telnet remote_machine
cd /home/some_directory
cat a_file_in_current_directory

Unfortunately after login/password I guess the script doesn't jump past the telnet command, until I exit. What do I need to do to make the script start executing commands in the remote shell?

View 1 Replies View Related

Ubuntu :: Daemon That Executes Commands Based On Input Device In Use?

Jan 28, 2011

I have a computer with a trackpad and a touchscreen. I want to run unclutter if I use the touchscreen, and kill it when I use the trackpad or a USB mouse.

The I'm pretty sure the touchscreen is /dev/input/mouse0, and the trackpad is /dev/input/mouse1

I have a general idea of how this should work, but no idea what tools and commands to use to implement it.

View 1 Replies View Related

CentOS 5 :: Creating A Simple Live CD That Executes A Shell Script?

Mar 9, 2010

I would like to a build a CD image (of CentOS 5, x86_64 that loads into memory and boots to the OS without installing anything to hard drives. Then I would like the system to execute a shell script automatically. The shell script will have commands that will control execution.

The goal of this exercise is basically to pre-configure a system (RAID config, BIOS update, etc) automatically using the shell script before installing the OS. I would like the ability to change the shell script as needed and probably repackage the ISO image. I would prefer not to deal with building a source tree to accomplish this. this is something one could do using mkisofs.

View 1 Replies View Related

General :: Bash Scripting - Executes A Few Perl Scripts - Create A New Array And Take The Hostname

Apr 4, 2011

I'm writing a bash script that executes a few perl scripts. One of the perl scripts that I need to execute requires two arguments with it. The arguments are stored in a txt file, each line contains a hostname and its corresponding IP address separated by a ":" (colon), the txt file looks like this below:

[Code]...

I'm not sure if it's the best way to accomplish this but here it goes. In the bash file, let's call it getHosts.sh, I create an array and assign each line of the file to an element in that array. I then think I need to create a new array where I take the hostname (which is before the ":") separate it from its IP address and place the IP address on a new line just below the hostname (this way I can reference to it like $hostNames[$x] would be the hostname, and $hostNames[$x+1] would be its IP address). So the new array would now look like this below:

[Code]...

View 4 Replies View Related

Programming :: Create A RS232 C Program That Executes A Series Of Commands Down The Line To A Robot?

Jan 5, 2011

I am trying to create a RS232 C program that executes a series of commands down the line to a robot. Everything seems to work fine, except any sequential write to the serial port. At first I thought it was the UART's buffer being filled too fast, but even with a 50 uS delay it still throws the error.

Here is my code:

Code:
#include <termios.h>
#include <stdio.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/signal.h>
#include <sys/types.h>

[Code]...

View 1 Replies View Related

CentOS 5 :: Create A CentOS Based LiveCD That Mounts A NFS Share And Executes One Script?

Aug 14, 2009

I'm trying to create a CentOS based liveCD that mounts a NFS share and executes one script there. The NFS never mounts altough while logged I can mount it with the very same command that I use in the KS.

In the %post I have :

%post --log=/tmp/post.log --erroronfail
mkdir /mnt/nfs
mount -o nolock 10.23.1.1:/csc/RemoteHome /mnt/nfs

I added the --log in order to debug, but nothing is written in /tmp/post.log. I tried redirection on the mount command with >> /tmp/debug.log but this is not written. Maybe during the post sequence /tmp is RO ? Anyway, I tried with ifup lo, service portmap start in the %post, but doesnt change (I even have a service : command not found in the live cd creator output).

Here is the remainder of the KS :
lang en_US.UTF-8
keyboard us
timezone US/Eastern

[Code]...

View 10 Replies View Related

Ubuntu :: Make A Startup Script That Executes A Simple Php Script At Boot?

Mar 24, 2011

trying to make a startup script that executes a simple php script at boot. The stipulation is that it must be run after fstab is processed because it requires access to a volume that fstab mounts. As it is, it doesn't seem to be running properly at startup, and I suspect that it is simply running before the volume is mounted. The script does not need root access. If I run it once I login, it works fine.

Also, is there a way to determine the output of a startup script?I am have configured a bash script called module.sh that cd's to the scripts directory (in the external volume) and then executes the script. I didn't forget the ampersand after the php invocation. I used update-rc.d module.sh defaults to configure it.

View 1 Replies View Related

General :: Kills A Process Internally Or From Where It Picks File To Continue Its Process?

Jan 8, 2010

one tell me the internal working of kill command. that is how it kills a process internally or from where it picks file to continue its process.

View 3 Replies View Related

General :: Elevate The Priority Of A Process Without Process Superuser Rights?

Jan 21, 2011

I have a high priority service that I start with sudo nice -n -10 process. This process does not need superuser rights though, except for the priority elevation. But nice requires superuser privileges to elevate priority.

View 3 Replies View Related

General :: How To Identify Raid Degrade Process / How To Rebuilt Process

Jun 12, 2010

send the details raid configuration how to use in linux el5 and how to indentify the raid degrade process and how to rebuilt the process.

View 4 Replies View Related







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