cancel
Showing results for 
Search instead for 
Did you mean: 
Create a Post
Highlighted

"cpview -p" with cprid_util : Failed windows size ioctl

Jump to solution

Hello CheckMates,

I'm trying to get the full output of cpview on a gateway from the manager CLI using cprid_util and I'm only getting the stderr:

CPView: Failed windows size ioctl with 25, Inappropriate ioctl for device.

I'm guessing it's because the shell cannot set a window size since it's a remote command. Would there be a way to fix my command get the output ?

Here's my command:

$CPDIR/bin/cprid_util -server 10.0.0.2 -verbose rexec -rcmd bash -c "cpview -p"

Edit: I'm testing this on R80.20, but will it will be used with R77.20, R77.30 and R80.10 gateways.

(I also tried calling the full path of /bin/cpview_start.sh )

Thanks!

Tags (1)
1 Solution

Accepted Solutions
Employee
Employee

Re: "cpview -p" with cprid_util : Failed windows size ioctl

Jump to solution

Hey Alain

I'm Adam from Diagnostics (owners of CPView)
Be aware that "cpview -p" was meant for debugging purposes (not as an API) and was deprecated in newer release

We've added SNMP capabilities to CPView, so you can use any SNMP tool to monitor your environments 

And we plan to add support to RestAPI in the future

As for your question there isn't an official API for getting the AV package version from the GW
But you can see it in this file

cat $FWDIR/amw_kss/update/Version                       

(

    :pkg_version (1109220741)

    :pkg_timestamp (1304253360)

)

So you can run it with awk to get your desired output

Thanks

View solution in original post

3 Replies

Re: "cpview -p" with cprid_util : Failed windows size ioctl

Jump to solution

So I tried to manually set a terminal and number of columns with no luck:

$CPDIR/bin/cprid_util -server 10.0.0.2 -verbose rexec -rcmd /bin/bash -c 'export TERM=vt220 && export COLUMNS=132 && cpview -p'

My final goal is to get the IPS and Anti-virus last update number, which I found available through cpview. Where does cpview get these informations from? I could get them from there instead of invoking cpview.

For example:

                         Blade status  Last update number Update Time

Anti-Virus          disabled       1109220741          16Nov2018 12:49:13

Thanks

0 Kudos
Employee
Employee

Re: "cpview -p" with cprid_util : Failed windows size ioctl

Jump to solution

Hey Alain

I'm Adam from Diagnostics (owners of CPView)
Be aware that "cpview -p" was meant for debugging purposes (not as an API) and was deprecated in newer release

We've added SNMP capabilities to CPView, so you can use any SNMP tool to monitor your environments 

And we plan to add support to RestAPI in the future

As for your question there isn't an official API for getting the AV package version from the GW
But you can see it in this file

cat $FWDIR/amw_kss/update/Version                       

(

    :pkg_version (1109220741)

    :pkg_timestamp (1304253360)

)

So you can run it with awk to get your desired output

Thanks

View solution in original post

Re: "cpview -p" with cprid_util : Failed windows size ioctl

Jump to solution

Exactly what I needed, thanks Adam!