General Linux Usage

Commands and installation instructions

Information on current CPU status (occupancy/usage):
>> top
Information on CPU spec:
>> cat /proc/cpuinfo
Installing Nvidia driver manually (SUSE):
>> init 3
>> su
>> cd /usr/src/linux
>> make cloneconfig
>> make prepare-all
>> modprobe agpgart
>> sh NVIDIA-xxxxx -q -n --kernel-source-path=/usr/src/linux
>> modprobe nvidia
>> sax2 -m 0=nvidia
Installing old rpm in now kernel (e.g 2.4.7 rpm in 2.6.7 kernel):
>> export LD_ASSUME_KERNEL=2.4.7-10
Recompile Linux kernel to 1000Hz (SUSE 10.2)
1) Modify /usr/src/linux/include/asm/param.h
2) Change #define HZ CONFIG_HZ --> #define HZ 1000 /*Internal kernel timer frequency*/
3) Go to /usr/src/linux
4) make cloneconfig
5) make prepare-all
6) make modules; make modules_install; make; make install
Unzip tar.bz2 file:
>> bunzip2 *.bz2
>> tar -xvf *.tar

MATLAB Simulink

Commands and troubleshoot

To compile sim model in a command prompt environment:
>> matlab # to access matlab
>> rtwbuild('name_of_model') #e.g. rtwbuild('sim_pacer_test')
Then run the program at the directory were the model is sitting:
>> ./name_of_model #e.g. sim_pacer_test
Outputing "simout" block array to text file:
>> dlmwrite('file_name', ary_var_name, 'delimiter', '\t', 'precision', '%.6f')
Get current block:
use with get_param() and set_param(gcb, 'param', 'param_value')
*.mak file was not created:
Was there a complain about cannot create '*.ofile'?
Move the sfunction file (*.cpp *.h) to the model directory so that the model can find them