Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 03-24-2015, 08:19 AM   #1
Registered: Oct 2011
Location: India, Mumbai
Distribution: RHEL, Fedora,Ubuntu, Centos, Windows XP & Windows 7
Posts: 44

Rep: Reputation: Disabled
OCS Inventory IP Address of Clients shows Blank on Web Page

Hi All,

I have posted this query on OCS site but didnt get reply. so i thought some might have face this issue & guide me thats why i posted my query here.

I have setup OCS Inventory server 2.1 on Centos server 6.5 64bit OS. All the details is coming to my OCS server properly except IP Address of Client Machines.

Majority of my client is running with ocsinventory-agent-2.1.1-1. below is my configuration file (Client side) ocsinventory-agent.cfg.


# Server URL, unconmment if needed
basevardir = /var/lib/ocsinventory-agent

# Administrative TAG (optional, must be filed before first inventory)
tag = Server

# How to log, can be File,Stderr,Syslog
logger = Stderr
logfile = /var/log/ocsinventory-agent/ocsinventory-agent.log


Currently i am monitoring three subnet as mentioned below.


1st subnet = (Inside DMZ)

2nd subnet = (Inside DMZ)

3rd subnet = (Inside DMZ)

4th subnet = (Outside DMZ)

When i execute manually "/usr/sbin/ocsinventory-agent" command the IP address of server gets displayed in "IP address" column. but after some time when other servers sends their inventory the ip addresses of earlier servers gets vanished from the column. it keeps vanished until i execute "/usr/sbin/ocsinventory-agent" command manually.

I have manually set a cronjobs for every 6 hours on clients to send inventory to server. when those crons gets runs even at that time IP address column shows blank but i can see in "Last inventory" column that inventory is just now.

Please guide me on the issue as i have tried almost all things but unable to find issue.

Attached is my Client side debug log file is very big.

If some had faced this issue or have some guidance please let me know.

Thanks in Advance...
Attached Files
File Type: txt ocsinventory-agent_log_part1.txt (240.9 KB, 149 views)
File Type: txt ocsinventory-agent_log_part2.txt (191.5 KB, 89 views)
Old 04-08-2015, 09:11 AM   #2
LQ Newbie
Registered: Jan 2004
Posts: 9

Rep: Reputation: Disabled
I had the same problem and stumbled across your question whilst looking for an answer.

I did a bit more research. The answer is simple: the cron job doesn't know the path to ifconfig (usual problem with cron jobs). Solution is to enter the cron job as:

* */3 * * * . /etc/profile; /usr/local/bin/ocsinventory-agent > /dev/null 2 >&1

You can check this by running ocsinventory-agent --local=/tmp from the command line and then as the cron job.

From the command line (which has the correct path) you get the correct content; from the cron job (without the path) you get a blank <NETWORKS> section.
1 members found this post helpful.
Old 04-29-2015, 02:23 AM   #3
Registered: Oct 2011
Location: India, Mumbai
Distribution: RHEL, Fedora,Ubuntu, Centos, Windows XP & Windows 7
Posts: 44

Original Poster
Rep: Reputation: Disabled
Thanks carlwilson for your info. it solved my issue.

However when i ran "* */3 * * * . /etc/profile; /usr/local/bin/ocsinventory-agent > /dev/null 2 >&1" from cron it didnt worked. but when i ran ". /etc/profile; /usr/local/bin/ocsinventory-agent > /dev/null 2 >&1" from shell script it worked. so i am running that shell script from cron now.

Still not figured out why its not woking from cron directly.

Thanks once again for your Info.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
OCS Inventory NG aocferreira Linux - Networking 0 05-16-2011 09:51 AM
LXer: GLPI - a great add-on to OCS Inventory LXer Syndicated Linux News 0 09-20-2006 05:21 PM
LXer: Howto install OCS Inventory NG LXer Syndicated Linux News 0 08-29-2006 01:54 PM
httpd problems - blank web page shows up when access from outside of internet LAN wk4997 Linux - Networking 2 01-21-2006 09:59 AM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:47 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration