Getting 'Killed' msg


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users Getting 'Killed' msg
# 8  
Old 11-29-2008
Quote:
Originally Posted by demwz
i assume grep matches in a binary file. data is printed and some special caracters causing the kill.
try: grep .... | strings
it schould work if my assumption is true
I am leaning toward the memory limit, in fact when I start .... at the $ prompt the command works, then if I enter tcsh and enter into the C shell the same command returns Killed.
How can I confirm my hypothesis?
Can I see the memory that s available in each shell?
Thanks!
# 9  
Old 11-29-2008
tcsh may be lowering your allowable memory. Try running tcsh and then type sh to get get a new copy sh. This new sh will be an offspring of tcsh and will inherit any new memory limitations from it. Try the command with this copy of sh.

How do you invoke tcsh? What shell do you start with? If you start with sh and then just do either "tcsh" or "exec tcsh" to switch to tcsh, a file called $HOME/.cshrc will be run and it could contain ulimit commands to lower your memory parameters. If you login as a user with a shell of tcsh, then you also need to review .login for ulimit commands.
# 10  
Old 11-29-2008
Quote:
Originally Posted by demwz
try: grep .... | strings
Did you try this? It's easy to do and it will give you additional information.

An even simpler test is to use grep -l .... That is, use the dash ell switch. I tells grep to not print anything it finds, but to only list the files that match.

Another thing to do would be to loop through the files and see which file actually causes the problem. Maybe something like this:
Code:
for f in /test/bin/*; do echo $f; grep "test string" $f; done

# 11  
Old 12-01-2008
Quote:
Originally Posted by Perderabo
tcsh may be lowering your allowable memory. Try running tcsh and then type sh to get get a new copy sh. This new sh will be an offspring of tcsh and will inherit any new memory limitations from it. Try the command with this copy of sh.

How do you invoke tcsh? What shell do you start with? If you start with sh and then just do either "tcsh" or "exec tcsh" to switch to tcsh, a file called $HOME/.cshrc will be run and it could contain ulimit commands to lower your memory parameters. If you login as a user with a shell of tcsh, then you also need to review .login for ulimit commands.
I start from the k shell, at that level the grep cmd
grep -l "test" /TEST/bin/*
works fine, if I then get into tcsh there the grep cmd
grep -l "test" /TEST/bin/*
gives me the Killed response.

There is no ulimit in my .cshrc maybe it is in the /etc/security/limits file (to which I do not have permission).

I can execute this cmd from a spawned ksh shell from inside the C shell with no problem
for j in /TEST/bin/*; do grep -l "test" $j; done
This just walks through the files one at a time and executes grep on each.
So there is no 'funny' characters in any of them, I suppose.
Is there any way I can actually see what mem I have left before executing the cmds in UNIX.
Thanks!
# 12  
Old 12-01-2008
How many files?

So you can run find in sh, ksh, csh but not tcsh?

Try renaming off your .cshrc so it's not used to see what happens.

See if you have a .tcshrc file.

Thanks.
# 13  
Old 12-01-2008
from tcsh, try:
/bin/echo /TEST/bin/*

I thinking that your tcsh may have a bug where it manages to kill itself if it builds too large of a command line.
# 14  
Old 12-01-2008
It would help to know how much data we are looking at I think. Maybe the tcsh can't handle over 2GB??? Just a thought, this is an old problem.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Displaying certain text in a msg.

I have a requirement to display a part of an html response that my application gets. The response looks like this: <html><a href='com.aprisma.spectrum.app.sd.client.SDHyperlinkHandler' sdTicketHandle='cr:419900' ocAlarmId='506618ea-f013-102d-02a7-0050569d7aa8'... (3 Replies)
Discussion started by: dlundwall
3 Replies

2. AIX

Error msg

When i run errpt -a, the output was below: --------------------------------------------------------------------------- LABEL: DMPCHK_NOSPACE IDENTIFIER: F89FB899 Date/Time: Tue Jan 17 15:00:02 BEIS Sequence Number: 28998 Machine Id: 0058C0CE4C00 Node Id: ... (2 Replies)
Discussion started by: Ivanku
2 Replies

3. Shell Programming and Scripting

My script is working but why do I get this msg?

Hi, I have a script to determine the max memory to set a worker to start up at. The variable will need to end up being "-Xmx512m" or "-Xmx256m" or "-Xmx768m." Everything works fine BUT when I set the "MEMORY" variable I get the "Cmmand not foundine 40: -Xmx512m" msg though the variable is the... (5 Replies)
Discussion started by: vsekvsek
5 Replies

4. UNIX for Dummies Questions & Answers

viewing the *.msg files

Is there any way we can view the *.msg files in unix / linux ? Example cat aa.msg Or Do we need to do any decryption ? Kindly provide the solution? (0 Replies)
Discussion started by: kingganesh04
0 Replies

5. Shell Programming and Scripting

msg??

I want to display a message when the script is done running, but I do not want to use echo. Is there another command I can use besides echo? If so, show me how it is done. (1 Reply)
Discussion started by: dshea0001
1 Replies

6. Programming

msg q

hi... i posted the code earlier but it wasnt quite readbale... ive added a few comments and made the indentation problem right... the problem is that it doent seem to be working... ive almost pulled out my hair tryin to fix the prob another wierd thing is that it worksthe 1st time when i... (0 Replies)
Discussion started by: strider
0 Replies

7. Programming

msg q again!

is it possible to use a msg queue with multiple threads spawned from the same app? (1 Reply)
Discussion started by: strider
1 Replies

8. UNIX for Dummies Questions & Answers

sendmail alert msg- How to

Sorry for such a simple question, but being new cannot find any info.. I am trying to ftp a file and checking if the ftp was successful or not. Either way I want to send an e-mail to myself to left me know if good ftp or ftp was not sent. I have the code in the program to do this and am going... (1 Reply)
Discussion started by: roncayenne
1 Replies

9. Linux

Pop error msg

mit@mydomain.com here is the latest error message: There was a problem logging onto your mail server. Your Password was rejected. Account: 'mit@mydomain.com', Server: 'mail.mit.com', Protocol: POP3, Server Response: '-ERR Logon failure: unknown user name or bad password.', Port: 110,... (2 Replies)
Discussion started by: naik_mit
2 Replies

10. IP Networking

Netstat msg

What do you think of the netstat msg about : udp 2320 0 *:xdmcp *:* The 2320? Does that mean an error? I used netstat -l | grep 'xdmcp' to get that, but does the 2320 indicate an error? I'm trying to figure out why, after i've enabled xdmcp to true, it is still not showing up... (2 Replies)
Discussion started by: kymberm
2 Replies
Login or Register to Ask a Question