Re: [PATCH/RFC 2/2] chcpu: new tool

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

 



On Mon, Aug 15, 2011 at 05:24:55PM +0200, Heiko Carstens wrote:
> +	if ((argc == 1) || (argc != optind))
> +		usage(stderr);
> +
> +	switch (cmd) {
> +	case CMD_CPU_ENABLE:
> +		return cpu_enable(cpu_set, ncpus, 1);
> +	case CMD_CPU_DISABLE:
> +		return cpu_enable(cpu_set, ncpus, 0);
> +	}

 What about to add CMD_CPU_SHOW and use it as a default if --enable/disable
 is not specified? 
 
 I know that you can use lscpu, but it's not intuitive... see for example 
 ionice, nice or so. You can see the current status and then change it.

 It's trivial change to the cpu_enable() function.

    Karel


-- 
 Karel Zak  <kzak@xxxxxxxxxx>
 http://karelzak.blogspot.com
--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux