Programming :: Make Own File As A Running Log?

Apr 1, 2011

I have written a small script from that iam appending the output to a file.If multiple users invoke the same script or if i invoke the same script n number of times (using &), the output file(ZZ/OUT) contains messup information.

++++++++++++++++++++++++++++++++
#!/bin/bash
#

[code]...

View 3 Replies


ADVERTISEMENT

Programming :: Running Many Tasks In Parallel / But More Clever Than 'make -j'?

Apr 29, 2011

I have a script which basically does many tasks and most of them can run in parallel. The server it runs on has 4 cores, so I changed parts of it to a makefile, and then run them with "make -j 4" which helps a lot. But looking at "top" while it runs, I see it could be improved. Sometimes tasks wait for other servers, so a higher -j value would help. And sometimes multiple tasks are waiting on the same disk, then I think a lower -j value would be better.

The kernel is fairly good at sharing CPU time among the cores, but resources like memory and disks are not shared very well. As an experiment, I tried compiling the kernel with "make -j" with no number. It didn't go very well.

So I wondered if anybody know of a better tool for things like this. I think it should be possible to write something that could change the -j value while it runs.For example:

- Start as many tasks in the background as there are cores. When tasks finish, start another one until done.
- After a little while, check CPU and memory usage to decide if more tasks could run in parallel. Or maybe less?
- If different tasks iowait a lot, check if they wait on the same disk. If so, renice/ionice/suspend some of them. In these situations I think it's better to have them run one after another.
- Other ideas?

I thought of making a script like that, but I doubt I'm the first one with that problem. Also, there are probably lots of things I haven't thought of.

View 5 Replies View Related

Ubuntu :: Running A Program Which Uses Make.sh File?

Sep 17, 2010

I amtrying to install a program and at the point when I am required to execute the command "make clean" and then after "make all" , I obtain the following eror message:

ndoheric@nen-laptop:/opt/WAVEFORPGM/distribute$ make clean
cd ./MyTime; make clean
make[1]: Entering directory `/opt/WAVEFORPGM/distribute/MyTime'

[code]...

View 4 Replies View Related

Red Hat / Fedora :: Running Opengl Make File?

Jun 7, 2010

I have a x86_64 i5 processor running Fedora 13.When I run the make file,I get the following error.Can someone help me out please?

# make
making all in ./lib...
make[1]: Entering directory `/home/Anil/Downloads/glut-3.7/lib'

[code]....

View 4 Replies View Related

Programming :: Make A Script That Will Check Service/s Status Whether Running Or Stop?

Sep 6, 2010

how to make a script that will check service/s status whether running or stop and also will run stop services?

View 9 Replies View Related

Programming :: Make A Folder For Each File In A Directory Then Move The File Into It

Nov 29, 2010

Initially I thought - use a for loop with ls in it:

Code:

However this causes lots of problems (folders have extensions, I have duplicate folders, the names with spaces create a folder for each element of the name).

The contents of the folder is basically movies (some with subtitles). Some of the names have things like (original) or CD1 CD2 in them.

View 15 Replies View Related

Programming :: Taking Back Up Of Log File For Running Process?

Feb 16, 2010

I am working in HP UNIX. I have one process which is running continuously.There is log file generated for the process. I want to take back up of file without loosing any logs after particular interval of time or say file size increases more that 1GB.

View 3 Replies View Related

Programming :: Make File Debugging Racking?

Feb 24, 2010

I have an environment where i have recursive make files (that is one main and in each directory of a project a file.mk with rules for that directory).Since i'm not the one who wrote it i'm not familiar with it. I would like to explore when i run certain targets how the rules work, which files cause dependency rules to work and why. Also i would like to know ALL the targets that are available to me. i couldn't find any way to 'debug' makefiles or to put it in such debug mode that i see all the information i need when i run a certain target.

View 4 Replies View Related

Programming :: Make An AWK Script That Goes Over The File Multiple Times?

Mar 11, 2010

Is it possible to make an AWK script that goes over the file multiple times, every time doing something different to it?

View 19 Replies View Related

Programming :: Get A List Of File Install Locations With Make It?

Dec 21, 2010

I have a bit of a problem and the only solution I can think of at the moment is a very tedious one, so I was hoping there would be a better way. What I am trying to do is cross compile the PPPD program so that I can install it on an embedded system (this system does not have make/gcc on it). It was easy to cross compile it, but I can not run "make install" since I'm compiling on a secondary machine. I don't want to install PPPD on this secondary machine (I couldn't anyway, because it was compiled for a different architecture) and I can't run make install on the target machine because there is no make/build system for it.

So it seems like what I would have to do is to manually copy over each compiled file from the build machine to the appropriate location of the target machine. And the only way (that I know of) to figure out how to do this is to manually examine the Makefiles (yes, there are several for PPPD) and figure out which file should go where on the target system. This isn't trivial because it uses a hierarchy of makefiles and the probability of human error for this method is high.

Is it possible that I could run another command that would give me a list of all the commands that make install would perform? Or a list of all files and their target location for "make install"? Or possibly some other solution that I am completely unaware of that would make this task not so painful and error prone?

View 8 Replies View Related

Programming :: GNU Make - System Libraries And File Permissions

Jan 27, 2010

I am trying to compile a C++ source file into a static library using make with root privileges (i.e., using "sudo"). However, I "sometimes" get the following compilation error:

Code:
g++ -Wall -g -fPIC -W -c /home/project/ether/src/packet-ethernet.cc
ar -cvq libether.a /home/project/ether/src/packet-ethernet.o
ar: /home/project/ether/src/packet-ethernet.o: No such file or directory
make: *** [libether.a] Error 1

I checked /home/project/ether/src folder to see if packet-ethernet.o in fact does not exist, and saw that it is actually located there, but its owner is "root", which is different from the current user. If I change the owner of packet_ethernet.o from root to the current user using "chown" command and execute make again with sudo, everything seems to be fine.

It may be a coincidence that I recently migrated to 64-bit platform from 32-bit, and then installed libboost-filesystem1.40-dev. After that, I began to experience such errors. I have "never" come across such a compilation error before. Even though I completely removed libboost-filesystem1.40-dev afterwards to see if it causes the problem, nothing changed.

After migrating to 64-bit and installing libboost-filesystem1.40-dev, my application exhibited another "weird" behaviour such that it produced "hidden" files using mkdir() system call, which were previously created as regular ones on the filesystem. Can compiler options that I use cause such problems? Is it possible that libboost-filesystem1.40-dev overwrote some system libraries so that I am getting such errors ?

View 1 Replies View Related

Programming :: Make A Binary Tree From An External File?

Dec 7, 2010

My assessment is making a tree from a text file as follows: -reading a file line by line

-making a binary tree from it
- traverse by level the binary tree
- posting the traversal result to the same file without overwriting the text file- it is required to be append to the bottom of the text file (i have to do this in 4 languages: c#,PHP from Xampp,java, python)

i read the file with this script in java:
public class FileToStringArray {
privateString strLine;
privateString[] stringArray;
privateFileInputStream in;

[Code]...

View 9 Replies View Related

Programming :: Make An EXE File For Windows XP That Does Not Require Any DLL, And Works?

Jul 17, 2010

I would like to create a code that is working on windows XP. I would like to have it like visual basic or very simple so that I can run some execlp, exec, or command="program.exe parameters" with also some internet support?GCC ? G++ ? but those require some DLL to be installed on any PC before running; it is for a friend to simplify his operations

View 5 Replies View Related

Programming :: Make The Robot Obey Compiled .cc File?

Jun 20, 2011

Player-Stage uses .cc files. I know how to compile them. But how do I actually execute my code? There is an output file generated. There is nothing in the .cfg file or in the .world file that specifies what program to use to run the robot. Or is it not specified in the world or cfg files?

Then how to make the robot obey my compiled .cc file? If this question is silly or if I am asking stupid questions

View 5 Replies View Related

Programming :: Make Variable To Refer A File In A Folder?

Dec 16, 2008

How can i make a variable in a bash script, to refer each file in a folder,and to switch it to the next file,until the last file of the folder?

View 2 Replies View Related

Ubuntu :: Make With Make File Yields Error - /usr/bin/javac: Cannot Execute Binary File

Nov 17, 2010

When I try to compile some Java code on Ubuntu 10.10 (kernel 2.6+) using make and a Makefile.

I get an error indicating that the make utility cannot execute the java compile command (javac).

The error reads: /bin/bash: line 6: .: /usr/local/jdk1.5.0_18/bin/javac: cannot execute binary file

I am executing make as root. I have enabled permissions on all directories in the path /usr/local/jdk1.5.0_18/bin/javac and on javac itself.

I get this error whether using a jdk installed via ubuntu apt-get, or whether I install the jdk myself. And I get it using either Java 1.5 or 1.6

My machine has an 80386 processor. I notice the make utility is built for i686-pc-linux-gnu

However, I can manually compile using javac.

I can compile calling javac from within a bash script.

I can compile using the java compiler gcj from the command line: gcj --main=HelloWorld HelloWorld.java -o HelloWorld.exe

But I cannot compile java code from the makefile. Any reasons why I might be getting this error?

View 4 Replies View Related

General :: Make And Sh Commands - Make A File Called File Roller For Ubuntu 9.10

Apr 6, 2010

I want to make a file called file roller for Ubuntu 9.10. The folder has a file called install.sh and some others that are make.

I figure first I need to make a file and then run install.sh to install. But I don't know how to do this.

View 2 Replies View Related

Programming :: Suid Disabled From Running All Scripts Or Just From Running Them As Root ?

Sep 4, 2009

Is suid disabled from running all home made bash scripts or just from running them as root or:

Who would know for sure.

I googled several combinations of Mandriva Linux how-to suid disabled setUID etc... so far all I found was "many distributions are disabling suid for security reasons" nothing specific.

View 2 Replies View Related

Programming :: Cron And Fsarchiver Reportedly Running Not Actually Running?

Jun 1, 2010

My root Vixie cron crontab is set to perform a system snapshot via fsarchiver: 0 0 * * * fsarchiver savefs -o -A /backups/p30_root.fsa /dev/sda2 /dev/sda3 The command itself works fine, generating about a 7G snapshot of my Suse server. I then wish to rsync this to a NAS I have located in another building: 0 3 * * * rsync -av -e ssh --delete /backups/ root{at address}:/DataVolume/os_backups/

(yes, I'm rsyncing as root. I absolutely loathe it, but I got thrown into an quasi-SA position with a ridiculous to-do list and no time to do it. I'm having to make things just work and then go back and try to improve them/learn how. I couldn't make it work in a non-root way quick enough, so for now I'm having to cron rsync jobs as root because of all the differing file permissions on this samba/MySql server. I set the NAS to only accepts ssh from the server IP, and we're behind a campus firewall... It's serious trial by fire.) The crontab also has rsync commands for the samba areas, our specialized chemistry software and affiliated MySQL databases............

View 2 Replies View Related

Programming :: Sms Server Tools Cross Compiling Sms Server Tool For An Embedded Computer And Make Just One Binary File For It?

Mar 27, 2010

I wanted to know how can I cross compile SMS SERVER TOOL for an embedded computer and make just one binary file for it or how can I change all of its default files places like its demon and object file and gather all of them to one directory to execute and use and run.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.now you tell me what can I do to solving this problem.

View 1 Replies View Related

Programming :: Makefile - Error When Run The Make Run - No Rule To Make Target - Shell.h

Sep 15, 2010

I want to gave much details as possible. working directory (~/a1/shell) in the shell directory i have Makefile. also in the shell directory i have subdirectory's (obj, src, include)

My current Makefile

Quote:

#What needs to be built to make all files and dependencies

clean:

# End of Makefile

I wanted it so: all .o files are created in the obj subdirectory, and my application, sshell, is created in the shell directory.

I am getting this error when i run the make run: No rule to make target 'shell.h', needed by 'shutil.o'. stop

View 1 Replies View Related

Programming :: Make A New Folder For Each File In A Particular Folder

Mar 28, 2011

I been using linux for a while, but I havent had the time to really learn it. Something Id like to get more familiar with is bash so here is a simple example of something I would like to do:

I have a directory full of files. For each file in the directory create a new subdirectory with each files name.

I tried this:

#im already in this directory
aaa=./*
for a in $aaa
do mkdir $a
done

One of the problems is that there are spaces () and - in the filenames so I get many subfolders with names like "-" which i don't want.

I tried stuff like:
aaa=./*
for a in $aaa
do mkdir "'"$a"'"
done

This of course also did not work.

Additional I tried just creating a folder with the name of one of the files and I got this:

mkdir: cannot create directory `(audio) - R56339.EXE': File exists
Well yeah a file exsists with that name, but I want to create a folder- why is there a conflict?

Just to be clear here are the contents of this folder:
~/Desktop/LAB/Media/Drivers - (Image Deployment)/Optiplex_GX260/XP> ls
(audio) - R56339.EXE (NIC-Onboard-Intel) - R54402.EXE
(Modem-datafax-V92) - R54403.EXE OEM_Applications

[Code].....

View 1 Replies View Related

Ubuntu :: Contex Menu [Make Link] Make Same File Size?

Dec 17, 2010

I notice that when you try to Make link to any file or folder form context menu, It just copy the same file size? even when i tried to copy the link to external storage disk..

View 1 Replies View Related

Ubuntu :: Cron Job Not Running - How To Make It Run

Mar 3, 2010

I have a cron job set up to backup my ~/ directory everyday at 10:00. But the cron job is not running. here is my confile that I loaded into crontab...

Code:

#backup everyday @ 10:00 AM and 10:30 AM
00 10 * * * /home/dave/bin/backup.sh
30 10 * * * /home/dave/bin/music_backup.sh

[code]....

the *.sh are executable. I logged out and logged back in since I put the cronfile in crontab. The commands that I use in the *.sh files work fine when I run them manually.

View 9 Replies View Related

Ubuntu :: 10.04 - Make MySQL Running On Startup?

May 3, 2010

I run Ubuntu 10.04. For some reason, MySQL won't start on startup. How do I make it run on startup? I installed it by installing LAMP using tasksel and did everything according to: [URL]. Also, I have another problem: When I try to start/stop/restart mysql in the terminal, the terminal will not give me any prompts after entering the command. E.g., after entering "sudo service mysql start", nothing will happen. Even after waiting for 30min, nothing happens.

View 9 Replies View Related

Ubuntu :: Make Remember Currently Running Applications?

May 2, 2011

i have installed Ubuntu 11.04 i.e Natty Narhwal(m i spelling it right?) i want my Ubuntu system to remember currently running applications even when i shut it down. It was possible in ubuntu 10.10...it was in startup applications(i guess). I cant hibernate. It fails to hibernate. Let me know if anyone knows anything.

View 9 Replies View Related

General :: Error When Running Make For Ns2.30 In Ubuntu 9.10

Mar 9, 2011

I need to use myevlavid2 on ns2 which is only supported for ns2 version up to ns2.30 (is not supported for newer ns2 versions): [URL] The NS installation went through well. After applying all the changes as given in the myevalvid2 installation guide, I ran the 'make' command, this is an extract of what I got:

[Code]....

View 6 Replies View Related

Software :: Getting Error When Running Make Command?

Jan 11, 2011

im trying to compile this file i ran the "cmake .." command and i just ran the "make" command and i got this error at the end

make[2]: *** [CMakeFiles/kmouse.dir/kinect_mouse.c.o] Error 1
make[1]: *** [CMakeFiles/kmouse.dir/all] Error 2
make: *** [all] Error 2

View 2 Replies View Related

Server :: Scp Truncate Text File Busy - Copying File Is Not A Running Binary?

Jun 14, 2010

I am having problems with scp during a backup operationI added a ps -ef before and after the scp operation used during the backup.The backup is a script to backup a Zimbra ServerI am including the code segment that I am having problems

Code:
# DRCP Section. To scp newly created archives to a remote system
if [ "$DRCP" = "yes" ]

[code]...

View 3 Replies View Related

OpenSUSE :: Make The Different Programs Running And Shown At Taskabar?

Jan 29, 2011

you can see below my taskbar Imageshack - snapshot1dj.png I would like to make the different programs running and shown at taskabar firefox,Fslint, Thunderbird to have some borders around them,

This will make them appear more clear to me.

View 9 Replies View Related







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