OCSInventory problem

 
Thread Tools Search this Thread
Operating Systems Linux Red Hat OCSInventory problem
# 1  
Old 10-25-2010
Network OCSInventory problem

Hello there everyone.

I have installed OCSInventory on 46 of my RHEL5 servers. But when the process is running after some time it makes this processes exp:

After a ps -ef |grep ocs here is what I get :

Code:
root      3073 28258  0 15:51 ?        00:00:00 [ocsinventory-ag] <defunct>
root      6459 17165  0 16:05 pts/0    00:00:00 grep ocs
root     28258     1  0 14:15 ?        00:00:02 /usr/bin/perl /usr/bin/ocsinventory-agent -d
root     30447 28258  0 15:01 ?        00:00:00 [ocsinventory-ag] <defunct>

Does someone know where can this com from ? If I restart the process everithing is ok for a while and after I see again [ocsinventory-ag] <defunct> processes.

Thank you for your help
# 2  
Old 10-25-2010
You can use lsof to see what file descriptors are attached to the offending processes.
# 3  
Old 10-25-2010
Thanks for the response.

I get this :

Code:
COMMAND   PID USER   FD   TYPE DEVICE     SIZE       NODE NAME
ocsinvent 639 root  cwd    DIR  253,0     4096          2 /
ocsinvent 639 root  rtd    DIR  253,0     4096          2 /
ocsinvent 639 root  txt    REG  253,2    14788     524700 /usr/bin/perl
ocsinvent 639 root  mem    REG  253,2    11924     101422 /usr/lib/perl5/5.8.8/i386-linux-thread-multi/auto/Fcntl/Fcntl.so
ocsinvent 639 root  mem    REG  253,2    31328     101385 /usr/lib/perl5/5.8.8/i386-linux-thread-multi/auto/Data/Dumper/Dumper.so
ocsinvent 639 root  mem    REG  253,2    22448     101604 /usr/lib/perl5/5.8.8/i386-linux-thread-multi/auto/PerlIO/encoding/encoding.so
ocsinvent 639 root  mem    REG  253,2    75284     102434 /usr/lib/libz.so.1.2.3
ocsinvent 639 root  mem    REG  253,2   174508     106465 /usr/lib/libgssapi_krb5.so.2.2
ocsinvent 639 root  mem    REG  253,2   157196     106463 /usr/lib/libk5crypto.so.3.0
ocsinvent 639 root  mem    REG  253,2   115264     101450 /usr/lib/perl5/5.8.8/i386-linux-thread-multi/auto/POSIX/POSIX.so
ocsinvent 639 root  mem    REG  253,0    21848     131112 /lib/libnss_dns-2.5.so
ocsinvent 639 root  mem    REG  253,2     6180     101639 /usr/lib/perl5/5.8.8/i386-linux-thread-multi/auto/Sys/Hostname/Hostname.so
ocsinvent 639 root  mem    REG  253,2   105664     197093 /usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi/auto/Net/CUPS/CUPS.so
ocsinvent 639 root  mem    REG  253,2   216592     106472 /usr/lib/libcups.so.2
ocsinvent 639 root  mem    REG  253,2    13376     105044 /usr/lib/libgpg-error.so.0.3.0
ocsinvent 639 root  mem    REG  253,0   280464     133339 /lib/libssl.so.0.9.8b
ocsinvent 639 root  mem    REG  253,2   509840     106471 /usr/lib/libgnutls.so.13.0.6
ocsinvent 639 root  mem    REG  253,2   360160     196727 /usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi/auto/Net/SSLeay/SSLeay.so
ocsinvent 639 root  mem    REG  253,2    64076     196910 /usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi/auto/Compress/Zlib/Zlib.so
ocsinvent 639 root  mem    REG  253,0    48524     133371 /lib/libnss_files-2.5.so
ocsinvent 639 root  mem    REG  253,2    14032     101395 /usr/lib/perl5/5.8.8/i386-linux-thread-multi/auto/Digest/MD5/MD5.so
ocsinvent 639 root  mem    REG  253,2    36376     101443 /usr/lib/perl5/5.8.8/i386-linux-thread-multi/auto/List/Util/Util.so
ocsinvent 639 root  mem    REG  253,0   121684     133314 /lib/ld-2.5.so
ocsinvent 639 root  mem    REG  253,0  1576952     133315 /lib/libc-2.5.so
ocsinvent 639 root  mem    REG  253,0    16528     133318 /lib/libdl-2.5.so
ocsinvent 639 root  mem    REG  253,0   208344     133317 /lib/libm-2.5.so
ocsinvent 639 root  mem    REG  253,0   125564     133324 /lib/libpthread-2.5.so
ocsinvent 639 root  mem    REG  253,2  1241272     105694 /usr/lib/perl5/5.8.8/i386-linux-thread-multi/CORE/libperl.so
ocsinvent 639 root  mem    REG  253,0    27836     133329 /lib/libcrypt-2.5.so
ocsinvent 639 root  mem    REG  253,0   101036     133336 /lib/libnsl-2.5.so
ocsinvent 639 root  mem    REG  253,2   347700     106470 /usr/lib/libgcrypt.so.11.2.2
ocsinvent 639 root  mem    REG  253,2    33940     101410 /usr/lib/perl5/5.8.8/i386-linux-thread-multi/auto/Encode/Encode.so
ocsinvent 639 root  mem    REG  253,2    16260     101437 /usr/lib/perl5/5.8.8/i386-linux-thread-multi/auto/IO/IO.so
ocsinvent 639 root  mem    REG  253,0     7720     133338 /lib/libcom_err.so.2.1
ocsinvent 639 root  mem    REG  253,0  1238928     133334 /lib/libcrypto.so.0.9.8b
ocsinvent 639 root  mem    REG  253,2    18432     101425 /usr/lib/perl5/5.8.8/i386-linux-thread-multi/auto/File/Glob/Glob.so
ocsinvent 639 root  mem    REG  253,0    76392     133337 /lib/libresolv-2.5.so
ocsinvent 639 root  mem    REG  253,2   559532     106464 /usr/lib/libkrb5.so.3.2
ocsinvent 639 root  mem    REG  253,2    30596     106462 /usr/lib/libkrb5support.so.0.1
ocsinvent 639 root  mem    REG  253,2    78548     101615 /usr/lib/perl5/5.8.8/i386-linux-thread-multi/auto/Storable/Storable.so
ocsinvent 639 root  mem    REG  253,2    20424     101612 /usr/lib/perl5/5.8.8/i386-linux-thread-multi/auto/Socket/Socket.so
ocsinvent 639 root  mem    REG  253,2     9032     101379 /usr/lib/perl5/5.8.8/i386-linux-thread-multi/auto/Cwd/Cwd.so
ocsinvent 639 root  mem    REG  253,0    15264     133340 /lib/libutil-2.5.so
ocsinvent 639 root  mem    REG  253,2 55565760     100745 /usr/lib/locale/locale-archive
ocsinvent 639 root    0u   CHR    1,3                1920 /dev/null
ocsinvent 639 root    1u   CHR    1,3                1920 /dev/null
ocsinvent 639 root    2u   CHR    1,3                1920 /dev/null
ocsinvent 639 root    3r   REG  253,2    11721     197065 /usr/lib/perl5/vendor_perl/5.8.8/Proc/PID/File.pm
ocsinvent 639 root    4r   CHR    1,9                2607 /dev/urandom
ocsinvent 639 root    5r   REG    0,3        0 4026531851 /proc/cpuinfo
ocsinvent 639 root    6r   REG    0,3        0 4026531842 /proc/meminfo

I can see that is coming from perl but don't know how to correct this bug
# 4  
Old 10-25-2010
Quote:
If you invoke Perl with the -d switch, your program will be run inside the Perl debugger. This works like an interactive Perl environment, prompting for debugger commands that let you examine source code, set breakpoints, dump out your function-call stack, change the values of variables, and so on. Any command not recognized by the debugger is directly executed (using eval) as Perl code in the package of the code currently being debugged.
Reference



---------- Post updated at 15:32 ---------- Previous update was at 15:18 ----------




Also, before running the debugger, the perl man page recommends:

Quote:
If something strange has gone wrong with your program and you're not
sure where you should look for help, try the -w switch first. It will
often point out exactly where the trouble is.
# 5  
Old 10-25-2010
Thanks for your help rely.
I was taking a look at this -d option but in all the scripts this is the -d option dor the deamon and debug. But it I put -w the process fails to start. Why can't I run it without this option ?
# 6  
Old 10-26-2010
Might be easier to create an alias (or wrapper, what ever you want to call it) for perl with the -w option in the alias/wrapper, and have the alias call perl (with the -w option) and redirect any warning messages to a log file.



---------- Post updated at 05:53 ---------- Previous update was at 05:51 ----------




Quote:
Originally Posted by theboogymaster
Thanks for your help rely.
I was taking a look at this -d option but in all the scripts this is the -d option dor the deamon and debug. But it I put -w the process fails to start. Why can't I run it without this option ?
You should look in the log files for perl error messages.

We can't see your log files from here Smilie (especially since you are not posting any error messages)
# 7  
Old 10-26-2010
There are no error messages.. In the log files I have this :
Code:
[Tue Oct 26 04:30:26 2010][info] Going to sleep for 1048 second(s)
[Tue Oct 26 04:48:12 2010][info] Going to sleep for 1875 second(s)
[Tue Oct 26 05:22:26 2010][info] Going to sleep for 1549 second(s)
[Tue Oct 26 05:48:46 2010][info] Going to sleep for 1666 second(s)
[Tue Oct 26 06:19:20 2010][info] Going to sleep for 3089 second(s)
[Tue Oct 26 07:13:21 2010][info] Going to sleep for 520 second(s)
[Tue Oct 26 07:22:25 2010][info] Going to sleep for 811 second(s)
[Tue Oct 26 07:36:14 2010][info] Going to sleep for 1889 second(s)
[Tue Oct 26 07:53:26 2010][info] Going to sleep for 882 second(s)
[Tue Oct 26 08:10:45 2010][info] Going to sleep for 542 second(s)
[Tue Oct 26 08:20:06 2010][info] Going to sleep for 2926 second(s)

So what you'r saying is to make an alias with a command like this :

Code:
/usr/bin/perl -w /usr/bin/ocsinventory-agent -d

The problem is that if I take out the -d option it wont run as a daemon and after a time the process stops. I checked the man of ocs and the -d option is for debug and daemon.
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. IP Networking

Router problem or ISP problem ?

Hi everyone, I am experiencing discontinuity of Internet service, this started 1 month ago. Everything worked very well for 1 year of intensive use, but now, I have problems reaching my gateway. The gateway is not my router but a node belonging to my ISP and I share the same public IP with... (3 Replies)
Discussion started by: remic
3 Replies

2. UNIX for Dummies Questions & Answers

sed Or Grep Problem OR Terminal Problem?

I don't know if you guys get this problem sometimes at Terminal but I had been having this problem since yesterday :( Maybe I overdid the Terminal. Even the codes that used to work doesn't work anymore. Here is what 's happening: * I wanted to remove lines containing digits so I used this... (25 Replies)
Discussion started by: Nexeu
25 Replies

3. IP Networking

Problem with forwarding emails (SPF problem)

Hi, This is rather a question from a "user" than from a sys admin, but I think this forum is apropriate for the question. I have an adress with automatic email forwarding and for some senders (two hietherto), emails are bouncing. This has really created a lot of problems those two time so I... (0 Replies)
Discussion started by: carwe
0 Replies

4. AIX

user login problem & Files listing problem.

1) when user login to the server the session got colosed. How will resolve? 2) While firing the command ls -l we are not able to see the any files in the director. but over all view the file system using the command df -g it is showing 91% used. what will be the problem? Thanks in advance. (1 Reply)
Discussion started by: pernasivam
1 Replies

5. Solaris

problem in finding a hardware problem

Hi I am right now facing a strange hardware problem. System get booted with the following error: Fatal Error Reset CPU 0000.0000.0000.0003 AFSR 0100.0000.0000.0000 SCE AFAR 0000.07c6.0000.1000 SC Alert: Host System has Reset It happen 4 or 5 times and get the same error every time.I... (8 Replies)
Discussion started by: girish.batra
8 Replies

6. Shell Programming and Scripting

ssh script problem problem

Hi Please help me with the following problem with my script. The following block of code is not repeating in the while loop and exiting after searching for first message. input_file ========== host001-01 host001-02 2008-07-23 13:02:04,651 ConnectionFactory - Setting session state... (2 Replies)
Discussion started by: pcjandyala
2 Replies

7. Shell Programming and Scripting

problem with dd command or maybe AFS problem

Hi, folks. Sorry for bothering, but maybe someone could help me please. The problem is the following: there is some script that copies files from local file system to AFS. The copying is performed with dd command. The script copies data into some AFS volumes. The problem appeared with one... (0 Replies)
Discussion started by: Anta
0 Replies

8. UNIX for Advanced & Expert Users

SSH Problem auth problem

Hi, Just recently we seem to be getting the following error message relating to SSH when we run the UNIX script in background mode: warning: You have no controlling tty. Cannot read confirmation.^M warning: Authentication failed.^M Disconnected; key exchange or algorithm negotiation... (1 Reply)
Discussion started by: budrito
1 Replies
Login or Register to Ask a Question