How to check debug.cfg

hrust_ray

Neuer User
Mitglied seit
11 Jan 2007
Beiträge
133
Punkte für Reaktionen
0
Punkte
0
Hallo. Sorry for english.
How can I check what is currently inside debug.cfg?
I tryed to insert some commands there, but after restarting the dont execute.

I modifyed debug.cfg by this command:

cat /var/media/ftp/1.txt > /var/flash/debug.cfg

file 1.txt was placed on root ftp directory
 
you can check it with:

nvi /var/flash/debug.cfg
 
Thx!
There are correct lines inside

ifconfig eth0:0 192.168.178.2 netmask 255.255.255.0 up
cd /var/media/ftp/MassStorageDevice-Partition-0-1/wt
./install.sh

But this lines seems are not executing on FB reboot. Maybe I should active something to force FB use default.cfg?
 
You should add a "sleep"-command. You can't change directory to your USB-Device if this is not mounted at that moment.
 
wichard schrieb:
You should add a "sleep"-command. You can't change directory to your USB-Device if this is not mounted at that moment.

Alles klar.
This mean the first line should be

sleep 15

for example? Is it in secs?
 
hrust_ray schrieb:
Yes. Just try out which time is needed to mount the USB-device. I'd try sleep 45.


Gruß,
Wichard
 
wichard schrieb:
Yes. Just try out which time is needed to mount the USB-device. I'd try sleep 45.

Ok.
One more thing. Is it possible to log messages from debug.cfg execution to file?
I know in dos it is possible by command_name > log.txt

Or it is dangerous to overflow flash memory capacity?
 
It depends on the size of the log-file. Most log-files should fit onto a 512MB USB-STick ;)

However, I had some problems logging onto the USB-Stick in the past: With a 7170 it worked fine, but with a 3070 the USB device froze after some days. The size of the Logfile was not the problem.:confused:
 
"flash-memory" - I'm talking about FB flash memory, not usb-stick
 
I don't think that it is a good idea to log directly to the Box-flash, because the flash-memory is very small (some 10KB's) and you can only write through virtual files like debug.cfg (debug.cfg is not a real file!) into it.

It's possible to create a new file in /var/flash, but after reboot the file doesn't exist anymore. The only way would be using the debug.cfg as logfile.
 
Ok.
That what I need - create temporary log files, that contains log from last booting sequence from debug.cfg.
After rebooting log files are deleted and created againg. So I have possibility to check logs from last booting.
It seems to be realistic.
 
In this case it would be better to create the Logfile on the RAM-Disc in /var/tmp
 
Yes, It's better. The last problem - how?
 
command_name > /var/tmp/log.txt
 
What happenes in this case?

command_name_1 > /var/tmp/log.txt
command_name_2 > /var/tmp/log.txt
command_name_3 > /var/tmp/log.txt
command_name_4 > /var/tmp/log.txt

/var/tmp/log.txt will contain finally logs from all 4 commands, or only from last command?
 
That version contains only the last one. You should use

Code:
command_name_1 > /var/tmp/log.txt
command_name_2 >> /var/tmp/log.txt
command_name_3 >> /var/tmp/log.txt
command_name_4 >> /var/tmp/log.txt
 

Neueste Beiträge

Statistik des Forums

Themen
244,859
Beiträge
2,219,663
Mitglieder
371,572
Neuestes Mitglied
#Kuddel#
Holen Sie sich 3CX - völlig kostenlos!
Verbinden Sie Ihr Team und Ihre Kunden Telefonie Livechat Videokonferenzen

Gehostet oder selbst-verwaltet. Für bis zu 10 Nutzer dauerhaft kostenlos. Keine Kreditkartendetails erforderlich. Ohne Risiko testen.

3CX
Für diese E-Mail-Adresse besteht bereits ein 3CX-Konto. Sie werden zum Kundenportal weitergeleitet, wo Sie sich anmelden oder Ihr Passwort zurücksetzen können, falls Sie dieses vergessen haben.