Couple of newbie Unix questions


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Couple of newbie Unix questions
# 1  
Old 08-14-2010
Couple of newbie Unix questions

I entered a command at the prompt and it's interactive (not background). It gathers some stats and writes them to a file. I want to see this job running and what it's doing - I/O especially and maybe CPU and stuff. What can do to see this (say using a second session?)
I know it's a long job but I'm not getting a prompt back and I'm not sure if it's running.

Jobs command does nothing when I run it.

This same command is in a script that is run after a job completes. When I run the sript interactively it loads the log file with data. But when I run it nohup <> & it doesn't produce any output - I'm told it's Oracle data. There's another program in the script that creates a file and puts some initial data in it but not as muh data as when I run it interactively.

So interactive works good but 'nohup script &' seems to skip log files or lacks data within the log file.
# 2  
Old 08-14-2010
Hi, when using nohupm output is written to nohup.out in the directory where the script was called if the user under which the script runs has write permissions there, to $HOME/nohup.out otherwise. You can direct the output to file by using:
Code:
nohup /path/to/script > /path/to/outputfile &

# 3  
Old 08-14-2010
NOHUP - Yes I get a file called nohup.out and it shows the commands being run/messages which normally appear on the screen while the script is running. But the output from the various programs within the script got to separate directory/files. One of the files doesn't get as much data as when I run it interactively.

Also got this error in the log file after logging off - since I ran it in the background I would have though it would keep going:

Called from GetStats.zPrAll.zPrServer.ServerDiff.DeltaKey.zHash.DeltaKey.Delta::zArray:552
FATAL ERROR: Received signal HUP;
Called from GetStats.zPrAll.zPrServer.ServerDiff.DeltaKey.zHash.DeltaKey.zArray.zFindTotal.(eval).main::zSigHand ler:3027
System call (open) failed; reason=No child processes
System call failed; reason=-1
~

---------- Post updated at 08:46 AM ---------- Previous update was at 06:21 AM ----------

Here's my steps....
1) Log into UNIX
2) Sudo into my environment
3) Run nohup perf_mon -c revoke.cfg &

If I log out (exit) and close my unix session and shut off my computer will the command still run? If not why not?

Also what does this command do?
nohup perf_mon -c revoke.cfg | tee revoke.out &

Also I'm logged in to work via the internet using VPN. When I lose my connection the session stops. This happens at least once a session (lousy connection). That's why I want to run the script in the background and make sure that the child scripts keep running when I lose my VPN connection.

Last edited by ido1957; 08-14-2010 at 12:13 PM..
# 4  
Old 08-14-2010
You shouldn't be piping anything out of a command run with nohup. I think it's the tee that's dying, not perf_mon, but that causes its pipe to break... Redirect output to revoke.out instead, then watch the file with 'tail -f revoke.out'.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Couple of questions wth grep/sort

I have different things that I was trying to do but am kind of struggling with this since I'm a Linux noob. The backround is that I have two files with student names in the same directory, and each file lists the student name, their major and their grade level. What is the most efficient way to... (6 Replies)
Discussion started by: tastybeer
6 Replies

2. UNIX for Dummies Questions & Answers

some basic unix questions pls iam a newbie

what is a assembler what isa interpreter what is a compiler what is a socket what is a port what is meant by listening to a port how we do it how to know version and standard of unix one is using when one is on public access unix account how to see a jobid in... (1 Reply)
Discussion started by: scimitar
1 Replies

3. Solaris

Couple logadm questions

My logadm.conf is below. Is there a way to match a log file that appends the time/date stamp after the log file? Also, a 0 is being appended onto the files I'm compressing and having rotated. Is there a way to fix that? /var/apache/tomcat55/logs/catalina.out -C 30 -P 'Fri Jun 18 16:48:55... (5 Replies)
Discussion started by: LittleLebowski
5 Replies

4. IP Networking

Couple of quick IP Routing questions

Hi 1) Is the MIB II table that can be accessed through the function m2IpRouteTblEntryGet() the same as the IP Routing table that the IP layer uses to do its routing work? 2) Is there a set of API functions, other than m2IpRouteTblEntryGet(), that are available to access entries in the IP Routing... (2 Replies)
Discussion started by: nzeidat
2 Replies

5. HP-UX

Couple of questions.

Right now I am a Microfocus COBOL programmer, working on a HP-UX system. I want to now get Certified as a HP Certified Systems Administrator. I ordered a book from amazon and will start with it. I also will be working at my job with someone who applies the patches and things as we do NOT have a... (3 Replies)
Discussion started by: nixie21
3 Replies

6. UNIX for Dummies Questions & Answers

unix questions for newbie

Hi Unix gurus, I know these are some easy questions. But i just want to be sure about them. Hope someone can help explain the following please? 1) if ] - What does the "-r" means? 2) isql -U $DBUSER -D $DBNAME -S $DSQUERY -w 1000 -s";" << testfile > $FILE - What does the -s";" mean and... (1 Reply)
Discussion started by: gholdbhurg
1 Replies

7. Debian

A couple of grub questions.

1) After I install a new kernel in Debian Sarge, it updates my menu.lst file for grub, but incorrectly. It assumes it should boot from partition hd0,0, but this is incorrect. How do I change this faulty assumption? 2) If grub fails to find a kernel, grub allows me to enter a path to... (1 Reply)
Discussion started by: akbar
1 Replies

8. Programming

Basic questions on writing a Unix Service (newbie help!)

Hi there. I've got 12 years experience writing C++ on Windows, and 3 years C# on Windows. Now my boss wants me to write a C++ app to run on Unix as a multithreaded 'service' (i.e. a program that runs with no user intervention). Some quick questions for The Experts: * Whats the best C++... (3 Replies)
Discussion started by: Rutland Gizz
3 Replies

9. Linux

Attn! A couple quick questions about Linux [Help]

Hi guys!! I was wondering if you can help me with a couple quick questions in order for me to understand it better... Any help would be appreciated and i would like to say thanks!! In advanced... Ok here goes... (I think these are pretty basic, but i just want to clarify) 1. What would be the... (2 Replies)
Discussion started by: kyoist
2 Replies
Login or Register to Ask a Question