Filesystem root low disk space

USB to CAN Interface
Locked
jcwilli5
Posts: 2
Joined: Fri 3. Sep 2021, 15:16

Filesystem root low disk space

Post by jcwilli5 » Fri 10. Sep 2021, 19:14

Im running the NETDEV SUPPORT version with my PEAK adapter on Ubuntu 18.04 to capture CAN packets. I'm using the following commands:

sudo modprobe peak-usb
sudo ip link set can0 up type can bitrate 250000
sudo ip link set up can0

After running this for a couple weeks on my PC and no other programs I get "Filesystem root low disk space". Other forums suggest that the logs are being stored somewhere. Any ideas on how to fix this?

M.Heidemann
Sales & Support
Sales & Support
Posts: 673
Joined: Fri 20. Sep 2019, 13:31

Re: Filesystem root low disk space

Post by M.Heidemann » Mon 13. Sep 2021, 08:20

Hello,

One would assume that you do more than:

Code: Select all

sudo modprobe peak-usb
sudo ip link set can0 up type can bitrate 250000
sudo ip link set up can0
to capture CAN traffic, so can tell us the exact command (with parameters) used
for capturing?

Furtermore, how much disk-space is there to begin with?

Best Regards

Marvin

jcwilli5
Posts: 2
Joined: Fri 3. Sep 2021, 15:16

Re: Filesystem root low disk space

Post by jcwilli5 » Wed 15. Sep 2021, 18:42

I'm running a basic logging script in an azure container on the Ubuntu PC:

Code: Select all

import logging
import time
import can
import j1939

logging.getLogger('j1939').setLevel(logging.DEBUG)
logging.getLogger('can').setLevel(logging.DEBUG)

def on_message(priority, pgn, sa, timestamp, data):
    """Receive incoming messages from the bus

    :param int priority:
        Priority of the message
    :param int pgn:
        Parameter Group Number of the message
    :param int sa:
        Source Address of the message
    :param int timestamp:
        Timestamp of the message
    :param bytearray data:
        Data of the PDU
    """
    print("PGN {} length {}".format(pgn, len(data)))

def main():
    print("Initializing")

    # create the ElectronicControlUnit (one ECU can hold multiple ControllerApplications)
    ecu = j1939.ElectronicControlUnit()

    # Connect to the CAN bus
    # Arguments are passed to python-can's can.interface.Bus() constructor
    # (see https://python-can.readthedocs.io/en/stable/bus.html).
    ecu.connect(bustype='socketcan', channel='can0')
    # ecu.connect(bustype='kvaser', channel=0, bitrate=250000)
    # ecu.connect(bustype='pcan', channel='PCAN_USBBUS1', bitrate=250000)
    # ecu.connect(bustype='ixxat', channel=0, bitrate=250000)
    # ecu.connect(bustype='vector', app_name='CANalyzer', channel=0, bitrate=250000)
    # ecu.connect(bustype='nican', channel='CAN0', bitrate=250000)

    # subscribe to all (global) messages on the bus
    ecu.subscribe(on_message)

    time.sleep(120)

    print("Deinitializing")
    ecu.disconnect()

if __name__ == '__main__':
    main()
Last edited by M.Heidemann on Thu 16. Sep 2021, 07:37, edited 1 time in total.
Reason: Please insert <code></code> tags when posting code, this improves readability.

M.Heidemann
Sales & Support
Sales & Support
Posts: 673
Joined: Fri 20. Sep 2019, 13:31

Re: Filesystem root low disk space

Post by M.Heidemann » Thu 16. Sep 2021, 07:41

This is uses the logging module of python-CAN.

We are not affiliated with Python-CAN in any capacity and cannot provide you
support. Please contact the Python-CAN community regarding this issue.

Best Regards

Marvin

Locked