What's new

Editing nvram variables

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

johnathonm

Regular Contributor
Hi,

I was wondering about editing nvram variables. I know it's possible to do with entware and busybox. If we were going to make changes where would they be placed? Or is that not possible at this time?

Thanks,

J
 
:confused::confused::confused: NVRAM variables are stored in... NVRAM. You can manipulate them with the "nvram" command, that's nothing to do with entware or busybox.
 
Sorry, I meant the sysctl -a variables.
 
I know I would use cat /sys/proc, but is there a list of these values that would correspond to what you'd get with sysctl. There is sysctl as part of busybox entware, btw.
 
I know I would use cat /sys/proc, but is there a list of these values that would correspond to what you'd get with sysctl.
I think the names are fairly self-evident. What exactly are you looking for?
There is sysctl as part of busybox entware, btw.
Yes I know, but it's not included in the basic firmware.
 
I want to tweak some of the defaults a bit. I am ok/good with unix. I just am not as used to doing it the longer way with cat.

I just want to experiment really, it's an academic exercise to learn and to possibly tweak out a bit more performance.

I have been looking at the vm and wmem etc, settings and want to adjust them. Maybe more.
 
I can't think of an easy way of displaying the value of every attribute in one go without installing additional software.

The best I can come up with is something like this:
Code:
# find /proc/sys
:
:
# find /proc/sys | grep wmem
/proc/sys/vm/lowmem_reserve_ratio
/proc/sys/net/core/wmem_max
/proc/sys/net/core/wmem_default
/proc/sys/net/ipv4/tcp_wmem
/proc/sys/net/ipv4/udp_wmem_min
# cat /proc/sys/net/core/wmem_max
122880
 
how can we make changes persistent
sysctl config is not used


never mind
included
echo 2500000 > /proc/sys/net/core/rmem_default

with a startup script i made earlier adding that line
 
Last edited:
You would have to put the commands in a user script. Which particular user script would depend on what it was you're changing, but often that's init-start.
Yeh i figured i already made such a script


my script now


1719513560813.jpeg
 
Last edited:
Which router and why did you likely reduce them by 1/2?
 
When creating scripts anything you can read with cat you can read/write with nano or vi as long as you have the permissions.

When creating a new script just make sure to give it executable permissions.

chmod a+rx /jffs/scripts/*

 
When creating scripts anything you can read with cat you can read/write with nano or vi as long as you have the permissions.
This is incorrect. Only regular files can be edited with the likes of vi or nano. Virtual files in /proc cannot be edited even though they can be read or written to.
 
This is incorrect. Only regular files can be edited with the likes of vi or nano. Virtual files in /proc cannot be edited even though they can be read or written to.

Your correct. I didn’t mean /proc, so not everything even if they technically can be written to; anything that’s automatically changed by the system shouldn’t be changed directly as it will be overwritten.
 

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top