Log in

View Full Version : Get Available Memory


Arhowk
29-01-2014, 22:04
I'm working on a new auton system and one of the main problems raised by my associates was how much memory the system was using. Is there a way to get the amount of memory currently available to the program?

otherguy
29-01-2014, 22:43
You can view many performance metrics using the log file viewer (http://wpilib.screenstepslive.com/s/3120/m/8559/l/97119-driver-station-log-file-viewer), but I don't think it displays available memory.

The only mechanism I can think of for viewing available system memory on the cRIO is to use netconsole (http://wpilib.screenstepslive.com/s/3120/m/8851/l/79731-using-netconsole)to get access to the operating system (vxWorks). I'm not sure if netconsole lets you send commands, if it doesn't you can try out this node.js implementation (https://npmjs.org/package/frcnetconsole).

Another alternative:
You should also be able to connect over the serial port. follow these steps (http://www.ni.com/white-paper/5694/en/#toc6), using a terminal program like HyperTerminal, or putty.
Connect a null-modem serial cable from your computers serial port to the controller serial port.
Configure a terminal program for 9600 bps, no parity bit, 8 data bits, and 1 stop bit.
Turn the CONSOLE OUT DIP switch on the controller to the ON position and reboot the controller. The terminal will display output and diagnostics during the boot process. When it is finished, the message “Welcome to LabVIEW Real-Time” will print.

Once at vxWorks, use the memShow command to view free/used memory.

More info on vxWorks commands here (http://touro.ligo-la.caltech.edu/~cparames/CDS/vxWorks_commands.html)

RufflesRidge
30-01-2014, 06:05
Click on the Charts tab of the Driver Station and look over to the right: http://wpilib.screenstepslive.com/s/3120/m/8559/l/92377-frc-driver-station-software

otherguy
30-01-2014, 13:25
Click on the Charts tab of the Driver Station and look over to the right: http://wpilib.screenstepslive.com/s/3120/m/8559/l/92377-frc-driver-station-software

Thanks for pointing that out. I didn't see it in the chart when I was looking last night.