Jump to content

Creating a graph

Featured Replies

Hi,

I want to create a graph from the following data. 

Please provide me the steps.

Garph1 BS

CPU Percentage 12
Memory Usage 15773696
sdiskusage total 9.82901E+11
sdiskusage used 1.41429E+11
sdisk usage free 7.91472E+11
sdisk usage percentage 15.2
virtual Memory 10234679296
rss 15773696
Time 1.026669979

Graph2 SS

CPU Percentage 2
Memory Usage 15769600
sdiskusage total 9.82901E+11
sdiskusage used 1.41429E+11
sdisk usage free 7.91472E+11
sdisk usage percentage 15.2
virtual Memory 10545913856
rss 15769600
Time 1.026956081

Graph3 BSBS

CPU Percentage 12
Memory Usage 15773696
sdiskusage total 9.82901E+11
sdiskusage used 1.41429E+11
sdisk usage free 7.91472E+11
sdisk usage percentage 15.2
virtual Memory 10234679296
rss 15773696
Time 1.071877241

Problem with the attached graph is that its creating the same graph for all the 3 data. How can I create variation using decimal values?Also it is not considering time?

 

Somebody please guide me.

G1.jpg

10 hours ago, zak100 said:

Problem with the attached graph is that its creating the same graph for all the 3 data. How can I create variation using decimal values?

The data for the three graphs is nearly identical so the graphs will be nearly identical. Maybe it is better to have separate y-axis scale for the values; the small variations and small values are not visible.

10 hours ago, zak100 said:

Also it is not considering time?

When drawing a bar that has the height of approximately [math]10^{11}[/math] next to one that is approximately 1.0 the latter will not be visible since it is so small in comparison.

Edited by Ghideon

It is a bit difficult since i am not sure what your goal is but here is some advice.

1.  Remove the 4 sdiskusage items from the 3 cases and put them in the graph title (since they are the same in all cases), something like "Comparison of CPU performance with a sdiscusage of total=bla bla, used= bla bla,  etc.

2.  for the virtual memory and the memory usage i would change them to megabytes a terabytes assuming that the numbers are bytes. 

3.  change the rss to rss x 10^-6

4.  change the time from sec to sec x 10

That should make all of the changing variable to th range of about 2 to 16 so you can see the differences easily.

Hope that helps or at least gives you some ideas.

On 3/29/2020 at 5:37 PM, Bufofrog said:

2.  for the virtual memory and the memory usage i would change them to megabytes a terabytes assuming that the numbers are bytes. 

It should be smarter than that. Pseudo code:

if mem >= 1e12 then printf( "%.1f TB", mem/1024/1024/1024/1024 )

else if mem >= 1e9 then printf( "%.1f GB", mem/1024/1024/1024 )

else if mem >= 1e6 then printf( "%.1f MB", mem/1024/1024 )

else ...

Also if we have fixed memory size, we could draw one continuous horizontal/vertical bar for both. Used memory in red color, free memory in green color. 

Edited by Sensei

  • 3 weeks later...
  • Author

Hi all,

Thanks for your responses.

@SenseiWhich language can I use for implementing this pseudo code?

Zulfi.

4 minutes ago, zak100 said:

 

@SenseiWhich language can I use for implementing this pseudo code?

ANSI-C is the closest. Just change to if(....) printf(....); (semicolon at the end of line of code is required)

and add #include <stdio.h> at the beginning.

and cast type to float (because %f is used)

Edited by Sensei

  • Author

Sir,

 

very good idea. I would try this .

 

God bless you 

 

Zulfi.

Archived

This topic is now archived and is closed to further replies.

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.