Related to: FC4 Sluggishness on a 466 MHz Celeron

Paul Howarth paul at city-fan.org
Wed Jul 13 07:18:32 UTC 2005


On Wed, 2005-07-13 at 01:46 -0500, Mike McCarty wrote:
> Paul Howarth wrote:
> 
> >On Tue, 2005-07-12 at 22:05 -0500, Mike McCarty wrote:
> >  
> >
> >>Tony Nelson wrote:
> >>
> >>    
> >>
> >>>At 2:08 PM -0500 7/12/05, Mike McCarty wrote:
> >>> 
> >>>
> >>>      
> >>>
> >>[with regards to /proc/sys/vm/swappiness]
> >>
> >>    
> >>
> >>>>>     
> >>>>>
> >>>>>          
> >>>>>
> >>>>So is mine, and attempts to edit that file fail.
> >>>>   
> >>>>
> >>>>        
> >>>>
> >>>Works here.  Were you root?  Do you really mean "edit" or did you:
> >>>
> >>>   # cat 59 >/proc/sys/vm/swappiness
> >>>
> >>>I get permission denied as a normal user, while the value sticks if I'm
> >>>root.  The sign that the patch is in the kernel is that changes don't
> >>>stick.  So I suppose it never made it in.
> >>> 
> >>>
> >>>      
> >>>
> >>I was logged in as myself, with su. I used an editor which read it fine.
> >>Attempts to save the edit failed with access denied. I did not try a cat.
> >>    
> >>
> >
> >/proc files aren't regular files and editing them with a regular editor
> >may not work.
> >
> >Neither would the "cat" command above, unless there was a file called
> >"59" in the current directory.
> >
> >What was probably meant was:
> ># echo 59 /proc/sys/vm/swappiness
> >
> >Paul.
> >  
> >
> I think you mean
> 
> # echo 59 > /proc/sys/vm/swappiness
> 
> which is what I took him to mean, as well.

Yes, that's what I meant.

> I don't understand why echo should be able to write a file that
> an editor cannot.

Some editors like to rename the original file to "filename~" and then
write out a new file "filename". This won't work in /proc.

Paul.
-- 
Paul Howarth <paul at city-fan.org>




More information about the fedora-list mailing list