I installed Asterisk in AWS (10GB storage), and only registered five extensions. However the system always report no space left. After I add more storage in AWS, the system will be full after few days (I did not install any new items).
mkdir: cannot create directory ‘newFolder’: No space left on device
How to I check the storage usage in the system? Also is there any commend to clean up the log?
Personally, I log everything through syslog – no application specific log files. I like to see everything that is happening when something goes pear shaped.
I also rename my syslog file every night like mv /var/log/syslog /var/log/syslog-$(date +%d) so I always have a month (ish) days of log files on tap and I never have to worry about cleaning up old files – they get over-written (almost) every month.
I am curious why you are creating such a huge file. Are you logging all SIP messages or all ‘AGI debug’ or is your call traffic huge?
You have presumably been running for a long time without doing a proper log rotation.
If you remove the file, you should then run “logger rotate”. Otherwise the space will not be freed and Asterisk will continue logging to anonymous file until it is restarted.