예제 #1
0
int
main(int argc, char **argv)
{
    int i = 0;
    int ret = 0;

    /* Clean up if we're told to exit */
    signal(SIGINT, sigint_handler);

    // First init the RAPL library
    if (0 != init_rapl()) {
        fprintf(stdout, "Init failed!\n");
        terminate_rapl();
        return MY_ERROR;
    }
    num_node = get_num_rapl_nodes_pkg();

    ret = cmdline(argc, argv);
    if (ret) {
        terminate_rapl();
        return ret;
    }

    do_print_energy_info();

    terminate_rapl();
}
예제 #2
0
int main(int argc, char **argv) {
	int i = 0;
	int ret = 0;

	// First init the RAPL library
	ret = init_rapl();
	if (ret) {
		fprintf(stdout, "Init failed (%d)!\n",ret);
		terminate_rapl();
		return ret;
	}
	num_node = get_num_rapl_nodes_pkg();

	ret = cmdline(argc, argv);
	if (ret) {
		terminate_rapl();
		return ret;
	}

	ret = do_set_power_limit();
	terminate_rapl();
	
	return ret;
}