What's new

Approved ways to free up NVRAM space...

  • 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!

SnakeByte

Regular Contributor
I've got a RT-AC68U that is using a lot of nvram.

I noticed recently that when I set the https_cert_file, my port forwarding table disappeared. I have seen data disappear before on older routers with smaller nvram setups when I wrote past the size limit, but thought I'd never run into this with my current router. Running 'nvram show' however showed me that, yes, somehow I'd managed to fill up 64k of nvram memory:

[Size: 65519 Bytes (17 left)]

A large majority of the space is being used up by the sshd keys, the ssh authorized keys, vpn keys, https_crt_file (and it's related chain), client_info_tmp which names the mac addresses, qos_rulelist, etc... much of that data is written to file for the various services which makes me wonder ...

Is there a safe and sane way to move some of these larger nvram entries out to JFFS?
 
Upgrade. 378.55 moved the OpenVPN key/certs to JFFS.
 
On my AC68U it shows:
NVRAM usage 53249 / 65536 bytes
JFFS 7.77 / 62.75 MB

Does anything look abnormal there?
 
On my AC68U it shows:
NVRAM usage 53249 / 65536 bytes
JFFS 7.77 / 62.75 MB

Does anything look abnormal there?

Without knowing what your exact configuration is, we cannot tell for sure. As long you aren't close to filling it, it's fine.
 
Upgrade. 378.55 moved the OpenVPN key/certs to JFFS.

I'm running 378.55 and have also noticed high NVRAM usage, with 16 bytes remaining.

Not running anything out of the ordinary with regards to my configuration.
 

Attachments

  • nvram_usage_20151013.png
    nvram_usage_20151013.png
    220.2 KB · Views: 1,911
I'm running 378.55 and have also noticed high NVRAM usage, with 16 bytes remaining.

Not running anything out of the ordinary with regards to my configuration.

You definitely do have something "out of the ordinary" if you are using that much nvram. With both one OpenVPN server and one OpenVPN client configured here, plus one SSH pubkey, I never got above 55 KB of used nvram. Might be time for a factory default reset, and manually reconfiguring everything.
 
You definitely do have something "out of the ordinary" if you are using that much nvram. With both one OpenVPN server and one OpenVPN client configured here, plus one SSH pubkey, I never got above 55 KB of used nvram. Might be time for a factory default reset, and manually reconfiguring everything.
Sorry RMerlin, but I forgot to mention that I did reset and reconfigure the router over the weekend before turning to the forms here for assistance.
 
Sorry RMerlin, but I forgot to mention that I did reset and reconfigure the router over the weekend before turning to the forms here for assistance.

Do a text dump of the nvram, so you can look into it for anything that would take an abnormal amount of space.

Code:
nvram show > /tmp/nvram.txt
more /tmp/nvram.txt
 
Do a text dump of the nvram, so you can look into it for anything that would take an abnormal amount of space.

Code:
nvram show > /tmp/nvram.txt
more /tmp/nvram.txt
Did this and trying to copy the text file from /tmp/ on the router to my Win7 Laptop using PSCP... but encountering the following error:
sh: /opt/libexec/sftp-server: not found
Fatal: Received unexpected end-of-file from server
 
Did this and trying to copy the text file from /tmp/ on the router to my Win7 Laptop using PSCP... but encountering the following error:
sh: /opt/libexec/sftp-server: not found
Fatal: Received unexpected end-of-file from server

You must use SCP - SFTP is not supported.
 
Interesting -- while the upgrade did free some nvram, I found that the router was unstable after the update. Not sure if that was because I already hit the limit of nvram before the update or not. In any event, it seem the advice to factory reset the device from time to time is good practice. I've got it all working like I had before, but now show 16,994 bytes free. I assume nvram variable names change between firmware releases and old stuff just gets left behind? That's a considerable difference.

It's too bad the "backup" one can do for the router isn't human readable -- It would have been convenient to be able to pull the info I wanted from it (such as vpn keys, etc). I know now to keep a copy of 'nvram show' for next time.
 
Interesting -- while the upgrade did free some nvram, I found that the router was unstable after the update. Not sure if that was because I already hit the limit of nvram before the update or not. In any event, it seem the advice to factory reset the device from time to time is good practice. I've got it all working like I had before, but now show 16,994 bytes free. I assume nvram variable names change between firmware releases and old stuff just gets left behind? That's a considerable difference.

It's too bad the "backup" one can do for the router isn't human readable -- It would have been convenient to be able to pull the info I wanted from it (such as vpn keys, etc). I know now to keep a copy of 'nvram show' for next time.


Has no one yet recommended to you the NVRAM Utility by john9527?

Even if using it directly between different firmware isn't required, it does show you the settings in a human readable fashion.
 
Interesting -- while the upgrade did free some nvram, I found that the router was unstable after the update. Not sure if that was because I already hit the limit of nvram before the update or not. In any event, it seem the advice to factory reset the device from time to time is good practice. I've got it all working like I had before, but now show 16,994 bytes free. I assume nvram variable names change between firmware releases and old stuff just gets left behind? That's a considerable difference.

OpenVPN keys and certificates have been moved from nvram to the jffs partition.

Sent from my Nexus 4 using Tapatalk
 
I am pushing the limits of NVRAM too.

My NVRAM shows:
3773 dhcp_staticlist
3704 client_info_tmp
3001 nmp_client_list
2896 custom_clientlist
1089 sshd_hostkey
624 sshd_dsskey
431 sshd_authkeys
396 rc_support

Is there anything here out of the ordinary or that I can do something with to free up some NVRAM?

Thanks
 
Last edited:
@gjf, this is a half-decade old thread. What actual RMerlin firmware are you running? On which router?
 

Latest threads

Sign Up For SNBForums Daily Digest

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