Linux kernel tuning TCP/Memcached
Matthew Gillen
me-5yx05kfkO/aqeI1yJSURBw at public.gmane.org
Tue Aug 3 15:45:55 EDT 2010
On 08/03/2010 07:35 PM, jc-8FIgwK2HfyJMuWfdjsoA/w at public.gmane.org wrote:
> Hmmm ... I'm trying to explain this:
>
> : cat /proc/sys/net/ipv4/tcp_tw_recycle
> 0
> : echo 1 > /proc/sys/net/ipv4/tcp_tw_recycle
> -bash: /proc/sys/net/ipv4/tcp_tw_recycle: Permission denied
> : sudo echo 1 > /proc/sys/net/ipv4/tcp_tw_recycle
> -bash: /proc/sys/net/ipv4/tcp_tw_recycle: Permission denied
> : cat /proc/sys/net/ipv4/tcp_tw_recycle
> 1
> :
That same set of commands does not set tcp_tw_recycle on my machine, and
shouldn't work. You must have done something in between, or have some strange
shell/alias thing going on (the sudo only applies to the 'echo 1' part, the
controlling shell handles the redirection, which is why you /should/ get the
permission denied, since the controlling shell doesn't get its privs escalated
by the sudo command).
>From the sudo man page:
> To make a usage listing of the directories in the /home partition. Note that this runs the commands in a sub-shell to make the cd and file redirection
> work.
>
> $ sudo sh -c "cd /home ; du -s * | sort -rn > USAGE"
Matt
More information about the Discuss
mailing list