1

I've read (here: Is the Raspberry Pi suitable for running continuously, 24/7?) that using a Raspberry Pi 24/7 is possible as long as you don't write too much on the SD card. So, how do you know if your system/application writes on it ? Are there kind of log of this ?

To be more precise, in my case I'm using the Raspberry as a DSP and I guess I'm not writing anything on it but, how to be sure ?

Corentoulf
  • 33
  • 4

4 Answers4

3

Assuming you are no longer talking about logs in particular.

Have a look at /proc/diskstats. If you cat /proc/diskstats you will see statistics for various devices.

Each device has 11 entries as follows.

Name            units         description
----            -----         -----------
read I/Os       requests      number of read I/Os processed
read merges     requests      number of read I/Os merged with in-queue I/O
read sectors    sectors       number of sectors read
read ticks      milliseconds  total wait time for read requests
write I/Os      requests      number of write I/Os processed
write merges    requests      number of write I/Os merged with in-queue I/O
write sectors   sectors       number of sectors written
write ticks     milliseconds  total wait time for write requests
in_flight       requests      number of I/Os currently in flight
io_ticks        milliseconds  total time this block device has been active
time_in_queue   milliseconds  total wait time for all requests

See https://www.kernel.org/doc/Documentation/block/stat.txt for further detail.

joan
  • 71,852
  • 5
  • 76
  • 108
1

Yes there are logs, most should be under /var/log.

Use the command ls /var/log -lrt to get a reverse time ordered list of files in that directory.

You can tune some logging with the file /etc/rsyslog.conf. If you want to disable as much logging as possible add a line with *.* ~ just after the #### RULES #### comment block.

Not all logging may be controlled in this fashion. Some programs bypass this configuration file and have their own configuration file for logging.

joan
  • 71,852
  • 5
  • 76
  • 108
0

You could use my Nard SDK as a platform base. It doesn't use the SD card at all after bootup. One can even remove the SD card and the system will continue to operate just fine.
http://www.arbetsmyra.dyndns.org/nard

Ronny Nilsson
  • 878
  • 5
  • 13
0

If you are looking for Raspbian that can be read only on demand, there is a special blackout-proof flavor of Raspbian called IPE – Industrial Perennial Environment R1. http://nutcom.hu/ipe-r1

avra
  • 1,273
  • 8
  • 9