Welcome to OCS Inventory NG community support, where you can ask questions and receive answers from other members of the community.

Please ask questions only in English or French.

Release 2.6 available

The official documentation can be found on http://wiki.ocsinventory-ng.org. Read it before asking your question.

Search for computer without software installed

How can I search for computers that do not have software installed so I can deploy to those computers?
in Administrative console by (420 points)

6 Answers

0 votes

login to mysql

select databse via

use ocsweb

the this command will give you all computers which have less then 1 software installed




SELECT hardware.name,hardware.lastcome,hardware_id, COUNT(softwares.name) FROM softwares join hardware on softwares.hardware_id = hardware.id GROUP BY hardware_id having COUNT(softwares.name)<1;

if you want all computers with less then 20 software packages you can try this

SELECT hardware.name,hardware.lastcome,hardware_id, COUNT(softwares.name) FROM softwares join hardware on softwares.hardware_id = hardware.id GROUP BY hardware_id having COUNT(softwares.name)<20;

kind regards

Sokatra

by (9.1k points)
0 votes
This does not answer my question. I need to do this through the web interface so I can get a list of computers to deploy too.

How do I do this through the web interface with search with various criteria?
by (420 points)
0 votes
this isn't possible via default webconsole in version 2.6

Please explain what do you mean with "software installed"

Doy you mean any software which is installed on a compuuter, or only software which was installed via ocs-inventory package deployment?

Kind regards
by (9.1k points)
0 votes
I want to search for computers that do not have a particular software package installed. If the software is not installed deploy my software package to it. I could do this in an older version, but not the newer versions. When I search for software.name different then <software title> I get all computers because other software on the computers meet this criteria.
by (420 points)
0 votes
I figured out my problem. You must use Dynamic Groups for this.

Step 1: Search with various criteria using All Software:Name Like <software name> you want to deploy

Step 2: Select Groups at bottom of page. Create new dynamic group. This group will contain all computers with this software.

Step 3: Search for various criteria using Group:Name  Don't Belong To <group name>. Deploy to those computers.

Hope this helps someone  else.
by (420 points)
0 votes

a much more flexible way is to use glpi. The OCS Database can be synchronized automatically with glpi and there you can do the following search

Software Characeristics - Name is not xy

You can combine the search with other search criterias much more flexible than ocs-inventory is able to do.

Kind regards

by (9.1k points)
 
Powered by Question2Answer
...