Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Livestat: A User Tool to dynamically display basekernel stats #252

Merged
merged 47 commits into from
Sep 6, 2019

Conversation

jmazanec15
Copy link
Collaborator

Addresses #231

Overview

Livestat is a user lever program that is meant to display a dynamic graphic of different basekernel statistics. Version 1 allows the user to look at Buffer Cache, Process, Device Driver, and System statistics.

Testing

Statworkload was developed to test this program. Statworkload is meant to simulate different workloads and produce interesting statistics.

Bugs

On some occasions, the combination of running statworkload and livestat causes livestat to segfault.

Misc. Notes

strdup was added to library/string.c to be used in livestat. Also, data types in all stats structs were changed from u_int32s and u_int64s to ints.

Future Enhancements

In the future, additional statistics should be added. In particular, memory utilization in pages and kernel mallocs should be tracked.

Copy link
Owner

@dthain dthain left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall, looks good! Just a few little things to fix below.

kernel/device.c Outdated
@@ -143,3 +159,18 @@ const char * device_name( struct device *d )
{
return d->driver->name;
}

void device_driver_get_stats(char * name, struct device_driver_stats * s)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please factor out the matter of finding a driver by name into a separate function:

struct device_driver * device_driver_lookup( const char *name )

And then also use that in driver_open.

@@ -584,6 +593,12 @@ int sys_system_rtc( struct rtc_time *t )
return 0;
}

int sys_device_driver_stats(char * name, struct device_driver_stats * stats)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

const char *name and is_valid_string(name)

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is_valid_pointer(stats)

@dthain dthain merged commit bf596aa into dthain:master Sep 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants