[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: How to get this from the librbary?

I am sorry,
I probably didnt explain it very well.

I was after how I use the openshift-restclient-java library to do what the "oc" command does.

I have managed to use this awesome library to get all the information I require from openshift so far (e.g. for project, pods etc.).


Virus-free. www.avast.com

On Wed, 8 May 2019 at 11:44, Ben Parees <bparees redhat com> wrote:
if you run oc with "--loglevel=8" you can see all the api calls it is making and the responses.

On Tue, May 7, 2019 at 7:06 PM Tony Herstell <tony herstell gmail com> wrote:
I dont know Openshift too well but I am trying to get the details that would be returned from this command:

oc describe node -l app=sc-app
... (towards the bottom)...

Allocated resources:
(Total limits may be over 100 percent, i.e., overcommitted.)
CPU Requests CPU Limits Memory Requests Memory Limits
------------ ---------- --------------- -------------
804m (50%) 1600m (100%) 1557Mi (6%) 3160Mi (12%)

I take all the %ages for all the nodes and then average them for the whole instance.... thereby getting a "utilization"...

Please advise...

I then disregard any nodes that are not ready..

oc get node -l app=sc-app --no-headers

and this bit seems to be available as client.getServerReadyStatus();

Virus-free. www.avast.com
dev mailing list
dev lists openshift redhat com

Ben Parees | OpenShift

Enterprise I.T. Consultant
PM, Technical BA, Architect, Tech Lead, Developer, Testing
Tony HerstellBSc (honours) (Microelectronics and Computing)
email:     tony herstell gmail com
phone:    +64 3 595 0215
mobile:   +64 21 302 302
mail:       646 Grange Road, 
              RD 7, 
              Christchurch 7677, 
              New Zealand

It is not the critic who counts; not the man who points out how the strong man stumbles, or where the doer of deeds could have done them better. The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood; who strives valiantly; who errs, who comes short again and again, because there is no effort without error and shortcoming; but who does actually strive to do the deeds; who knows great enthusiasms, the great devotions; who spends himself in a worthy cause; who at the best knows in the end the triumph of high achievement, and who at the worst, if he fails, at least fails while daring greatly, so that his place shall never be with those cold and timid souls who neither know victory nor defeat. - Theodore Roosevelt

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]