2 Bronze

Is it possible to use > in jobquery ?

Jump to solution

I'm trying to use jobquery to search for jobs like this:

jobquery> print start time>1489352441

No resources found for query:

       start time>1489352441: ;

The man page does not clarify if > and < operators are allowed, but it seems they are not.

Aren't they, or am I doing something wrong?

P.S. I need jobquery and not mminfo, please do not suggest using mminfo as a workaround. mminfo does not provide information about jobs, just completed savesets.

0 Kudos
1 Solution

Accepted Solutions
2 Bronze

Re: Is it possible to use > in jobquery ?

Jump to solution

Strangely enough, it may depend on the server version. Seems not to depend on OS.

I have had the opportunity to test around our server pool:

(Original server tested on, the one we are working on - for obvious reasons)

Networker Server 7.6.3.0 on Windows Server 2003R2 SP2

jobquery> print start time>1489352441

No resources found for query:

       start time>1489352441: ;

Networker Server 8.2.1.8 on SLES 11 SP4

jobquery> print start time>1489352441

[thousands of results]

Networker Server 8.2.0.4 on Windows Server 2008R2 SP1

jobquery> print start time>1489352441

[thousands of results]

Conclusion: The man pages should be updated and clarified.

View solution in original post

7 Replies
3 Argentum

Re: Is it possible to use > in jobquery ?

Jump to solution

Sorry but the answer is no.  It may be better to export the raw data to a spreadsheet and then perform the query that you need.

From the NetWorker Command Reference guide, jobquery:


Each resource is described by a list of attributes, and ends in a blank line. Each attribute in the attribute list has a name and an optional list of values. The attribute name is separated from the attribute values by a colon (:), attribute values are separated by commas (,), and each attribute ends in a semicolon (;). A comma, semicolon or back-slash (\) at the end of a line continues the line.

0 Kudos
4 Ruthenium

Re: Is it possible to use > in jobquery ?

Jump to solution

Of course you can.

'jobquery' is nothing else but a specific 'nsradmin' command. As you might expect, the same rules are valid here.

You can get the output if you run it either

- interactively, for instance ...

jobquery > output_file.txt

. job id: 12345

[show ....]

p

q

>>> Be aware that you will not see an input prompt <<<

- per input file ...

copy all commands to a text file, one per line

run "jobquery -i input_file > output_file"

0 Kudos
3 Argentum

Re: Is it possible to use > in jobquery ?

Jump to solution

@bingo... what you are showing is how to rediredct the output

but the original question is whether it is possible to perform a jobquery query, such as:

     jobquery> print start time>1489352441


Which according to the man page is not possible

0 Kudos
4 Ruthenium

Re: Is it possible to use > in jobquery ?

Jump to solution

Correct ... one should not do too many things at a time 😉

However, there is a solution (at least a way) if you use NW 8.2.3.0 and up:

  - Copy the jobsdb file /nsr/res/jobsdb/jobsdb.db file

  - Open it with an appropriate SQLite Viewer

  - Run the SQLite command like

        Select * from "save job" where "start time" > "1486987512"

  - Refine the SQL command until you only get what you want.

        I am sure there is enough online help available (I am not a SQL expert)

0 Kudos
2 Bronze

Re: Is it possible to use > in jobquery ?

Jump to solution

I'm sorry but you didn't understand the question.

The "jobquery>" part weren't a command and a redirection. It was an interactive prompt, and the question was about the next ">" implying comparison.

Thanks anyway.

0 Kudos
2 Bronze

Re: Is it possible to use > in jobquery ?

Jump to solution

Strangely enough, it may depend on the server version. Seems not to depend on OS.

I have had the opportunity to test around our server pool:

(Original server tested on, the one we are working on - for obvious reasons)

Networker Server 7.6.3.0 on Windows Server 2003R2 SP2

jobquery> print start time>1489352441

No resources found for query:

       start time>1489352441: ;

Networker Server 8.2.1.8 on SLES 11 SP4

jobquery> print start time>1489352441

[thousands of results]

Networker Server 8.2.0.4 on Windows Server 2008R2 SP1

jobquery> print start time>1489352441

[thousands of results]

Conclusion: The man pages should be updated and clarified.

View solution in original post

3 Argentum

Re: Is it possible to use > in jobquery ?

Jump to solution

Nice catch...

Try using a calender format instead of the nsavetime value.  That might make it easier for queries if it works.

0 Kudos