Create a Post
cancel
Showing results for 
Search instead for 
Did you mean: 
Alain_Yamin
Participant
Jump to solution

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

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!

1 Solution

Accepted Solutions
Adam_Zidiker
Employee Alumnus
Employee Alumnus

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
Alain_Yamin
Participant

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
Adam_Zidiker
Employee Alumnus
Employee Alumnus

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

Alain_Yamin
Participant

Exactly what I needed, thanks Adam!

Leaderboard

Epsum factorial non deposit quid pro quo hic escorol.

Upcoming Events

    CheckMates Events