Data Protector User Discussions
cancel

DP9x Get all Sessions + status of a specific Host/Client in the last 24 hours

SOLVED
Go to solution
Highlighted
sofromt Valued Contributor.
Valued Contributor.

DP9x Get all Sessions + status of a specific Host/Client in the last 24 hours

Hi,

i need a way to get the session numbers for a corresponding host via omnirpt.

list_essions just gives me data list names, but no host.
host report lists sessions but no status of the session
host_statistics prints a overall satus of the host, but no sessions

It looks like it's a bit frustrating to get a list of sessions and the status for one single host without querying different omnirpt commands. Anyone an idea?

1 ACCEPTED SOLUTION

Accepted Solutions
Gamut Super Contributor.
Super Contributor.
Solution

Re: DP9x Get all Sessions + status of a specific Host/Client in the last 24 hours

Hi sofromt,

I have vast experience with CLI, but I too did not find a way to do it with a single command. The best I can do, is give you workarounds.

Workaround 1: Get all sessions of the past 24 hours. Foreach sessions, get the session objects (to find host/client). Print host/client and the session it was found in:

CELLMANAGER=localhost; /opt/omni/bin/omnirpt -report list_sessions -timeframe 24 24 -tab -server "${CELLMANAGER}" | awk -F$'\t' '/^[^#]/ {print $23}' | while read -r SESSION_ID; do /opt/omni/bin/omnirpt -report session_objects -session "${SESSION_ID}" -tab -server "${CELLMANAGER}" | awk -F$'\t' -v "SESSION_ID=${SESSION_ID}" '/^[^#]/ {print $2 " " SESSION_ID}'; done | grep -i '^myclient '

(My Cell Managers are on Linux and I there use bash/awk/grep. The same should be doable with, say, Power Shell if you are on Windows.)


Workaround 2: Assuming your DP database is running on PostgreSQL: query the database instead of using CLI commands. I wrote about querying the Postgres DB in thread https://community.softwaregrp.com/t5/Data-Protector-Practitioners/export-list-of-clients/m-p/1628575#M152939 . It is not for the faint of heart though, since the data model is not known (at least not by me).

Does this at least help you a bit?

1 REPLY
Gamut Super Contributor.
Super Contributor.
Solution

Re: DP9x Get all Sessions + status of a specific Host/Client in the last 24 hours

Hi sofromt,

I have vast experience with CLI, but I too did not find a way to do it with a single command. The best I can do, is give you workarounds.

Workaround 1: Get all sessions of the past 24 hours. Foreach sessions, get the session objects (to find host/client). Print host/client and the session it was found in:

CELLMANAGER=localhost; /opt/omni/bin/omnirpt -report list_sessions -timeframe 24 24 -tab -server "${CELLMANAGER}" | awk -F$'\t' '/^[^#]/ {print $23}' | while read -r SESSION_ID; do /opt/omni/bin/omnirpt -report session_objects -session "${SESSION_ID}" -tab -server "${CELLMANAGER}" | awk -F$'\t' -v "SESSION_ID=${SESSION_ID}" '/^[^#]/ {print $2 " " SESSION_ID}'; done | grep -i '^myclient '

(My Cell Managers are on Linux and I there use bash/awk/grep. The same should be doable with, say, Power Shell if you are on Windows.)


Workaround 2: Assuming your DP database is running on PostgreSQL: query the database instead of using CLI commands. I wrote about querying the Postgres DB in thread https://community.softwaregrp.com/t5/Data-Protector-Practitioners/export-list-of-clients/m-p/1628575#M152939 . It is not for the faint of heart though, since the data model is not known (at least not by me).

Does this at least help you a bit?

Top Contributors Last 30 Days