Go to advanced search

by jahboater
Thu Jan 21, 2016 8:55 am
Forum: General discussion
Topic: Pi2 is flaky and keeps crashing
Replies: 51
Views: 5538

Re: Pi2 is flaky and keeps crashing

Have you tried Jessie yet?

The Pi is a very reliable platform.
Many people use them as servers running 24/7 for long periods without issue.

Perhaps you could give us more details of your little program and about the failures and maybe someone here could help?
by jahboater
Wed Jan 20, 2016 9:15 am
Forum: C/C++
Topic: Baffled why program would suddenly start randomly exiting
Replies: 3
Views: 753

Re: Baffled why program would suddenly start randomly exitin

Static memory is always initialised to zero. static int parsedData[50]; is all that's needed. Adding "= { 0 };" makes it explicit, and more readable (I think) but will not change resulting code (unless you have -fno-zero-initialized-in-bss - see man gcc). The compiler will fill in the remaining 49 z...
by jahboater
Sun Jan 17, 2016 7:22 pm
Forum: Advanced users
Topic: Overclocking
Replies: 1125
Views: 614684

Re: Overclocking

To help the sdram stability you could try "disable_pvt=1" which sets a fixed conservative dram refresh rate (otherwise the sdram temp is measured twice per second and a more optimal refresh rate set dynamically). It worked for me, but later I added heatsinks to the sdram and the SoC and it was no lo...
by jahboater
Sat Jan 16, 2016 11:59 am
Forum: Raspbian
Topic: How to compile Gnuradio 3.7.9
Replies: 9
Views: 3860

Re: How to compile Gnuradio 3.7.9

Gnuradio is supported on the Pi2.
Only version 3.7.5 though.
Should be fast though if its making good use of neon.
by jahboater
Sat Jan 16, 2016 10:26 am
Forum: Raspbian
Topic: How to compile Gnuradio 3.7.9
Replies: 9
Views: 3860

Re: How to compile Gnuradio 3.7.9

Have a look at http://svr-acjf3-armie.cl.cam.ac.uk/main.cgi
The insn is in a file
volk/kernels/volk/asm/neon/volk_32f_x2_dot_prod_32f_neonasm_opts.s
Neon is not supported on the Pi1.
There must be a build option somewhere to replace this optimization with portable code.
by jahboater
Sat Jan 16, 2016 9:24 am
Forum: Raspbian
Topic: How to compile Gnuradio 3.7.9
Replies: 9
Views: 3860

Re: How to compile Gnuradio 3.7.9

sbfx is supported by "as" on the Pi2 (ARMv7)
Are you sure sbfx is available on the ARMv6 - it looks like its thumb2, or came in with thumb2?
by jahboater
Sat Jan 16, 2016 12:22 am
Forum: Troubleshooting
Topic: Python is barely usable on Raspbian
Replies: 31
Views: 7612

Re: Python is barely usable on Raspbian

if you have Python 3, and post the times from both machines? Real times 4GHz Core i7-3770k 16GB SSD Intel PC pip -h 0.182 pip3 -h 0.301 Pi2 (Jessie Lite) pip -h 1.225 pip3 -h 1.791 Does it make any significant difference with only one ssh session and no top? Adding another ssh session with top runn...
by jahboater
Thu Jan 14, 2016 6:29 pm
Forum: Troubleshooting
Topic: Python is barely usable on Raspbian
Replies: 31
Views: 7612

Re: Python is barely usable on Raspbian

My Pi2 executes the python3 script in 0.246 seconds.
About 17 times slower than my PC which cost 45 times as much, and uses about 150 times as much electricity. The Pi2 is a bargain!
by jahboater
Thu Jan 14, 2016 5:23 pm
Forum: C/C++
Topic: CPU load on computer
Replies: 9
Views: 2791

Re: CPU load on computer

/proc is your friend. See "man 5 proc" and look down for /proc/stat which will give you details of each field. The file "/proc/stat" appears as a normal text file. It may be opened in the usual way (fopen) (you can also look at it with your favourite editor for example) and read with scanf. Read and...
by jahboater
Thu Jan 14, 2016 1:41 pm
Forum: C/C++
Topic: CPU load on computer
Replies: 9
Views: 2791

Re: CPU load on computer

top seems to use percentage of one CPU for individual processes but percentage of all CPUs for the totals at the top. munin seems to use percentage of one CPU for total usage I prefer top's convention. munin would say the Pi2 CPU is 100% utilized when in fact 75% of the CPU resource is idle. I pres...
by jahboater
Thu Jan 14, 2016 12:53 pm
Forum: C/C++
Topic: CPU load on computer
Replies: 9
Views: 2791

Re: CPU load on computer

Is this a Raspberry Pi2 or one of the other Pi's. The Pi2 has four CPU's so a program using 100% of its CPU may be considered a 25% overall CPU load, but on a B+ it would be 100% overall load. Experiment with top! A more useful value is the load average (again see top, or uptime) from /proc/loadavg ...
by jahboater
Wed Jan 13, 2016 9:14 pm
Forum: C/C++
Topic: drand48 give segfault
Replies: 5
Views: 1053

Re: drand48 give segfault

Most pseudo rng's save the state between calls in static memory.
Glad it works now!
by jahboater
Wed Jan 13, 2016 2:01 pm
Forum: Advanced users
Topic: How to speed up boot time if run headless?
Replies: 28
Views: 76334

Re: How to speed up boot time if run headless?

To measure boot time for Jessie, try systemd-analyze
On its own it just gives details of the total boot time.
add "blame" to get a list of the individual unit's boot times, longest first
add "plot" to create a plot similar to bootchart.
"man systemd-analyze" tells all
by jahboater
Wed Jan 13, 2016 8:37 am
Forum: C/C++
Topic: drand48 give segfault
Replies: 5
Views: 1053

Re: drand48 give segfault

Works with gcc 5.3 on a Pi2.
Is your program multi-threaded by any chance?
by jahboater
Tue Jan 12, 2016 8:27 am
Forum: General discussion
Topic: Raspberry Pi on PC
Replies: 2
Views: 502

Re: Raspberry Pi on PC

Unlikely because Raspbian is for the ARM cpu architecture while your HP computer is probably Intel x86. There are however many (hundreds) of Linux distributions for x86 that you could install. Try Debian (that Raspbian is based on) or Ubuntu (that is based on Debian) perhaps. If your HP machine is v...
by jahboater
Tue Jan 12, 2016 7:57 am
Forum: Troubleshooting
Topic: Can't Change SSH Port
Replies: 10
Views: 4336

Re: Can't Change SSH Port

Its a linux/unix tradition: 'd' in the name means "daemon" which is the server. So ntpd refers to the Network Time Protocol server etc etc.

If you only use ssh or scp locally then you may well find it easer to edit BOTH files rather than using -p (for ssh) or -P (for scp) every time.
by jahboater
Mon Jan 11, 2016 6:15 pm
Forum: Troubleshooting
Topic: Can't Change SSH Port
Replies: 10
Views: 4336

Re: Can't Change SSH Port

Here is what my sshd_config file looks like: # This is the ssh client system-wide configuration file. See # ssh_config(5) for more information. This file provides defaults for # users, and the values can be changed in per-user configuration files # or on the command line. But that is the client fil...
by jahboater
Mon Jan 11, 2016 5:53 pm
Forum: Troubleshooting
Topic: Can't Change SSH Port
Replies: 10
Views: 4336

Re: Can't Change SSH Port

I think you have the client and server config files mixed up.
by jahboater
Sun Jan 03, 2016 7:06 pm
Forum: General programming discussion
Topic: Raspberry pi programming
Replies: 4
Views: 1069

Re: Raspberry pi programming

Rasbian (linux) provides a very powerful software development environment in its own right. The common languages such as Python and C/C++ are provided as standard. Nothing need be installed. Its not like Windows. You do not need any of this:- On an arduino, i create a program on a windows ide, then ...
by jahboater
Sun Jan 03, 2016 6:16 pm
Forum: Beginners
Topic: Can't set up Pizero (SOLVED)
Replies: 13
Views: 1882

Re: Can't set up Pizero

The cable is plugged into the zero via Magpi's usb adaptor.
Have you tried plugging it directly into the micro hdmi socket? (or was the "usb" bit a typo?).
by jahboater
Fri Jan 01, 2016 11:10 am
Forum: Beginners
Topic: Possible to use SD Card over 8GB?
Replies: 20
Views: 4278

Re: Possible to use SD Card over 8GB?

I'd try another card, I suspect yours is either faulty or a fake. It should never take 12 hours to wipe the partition table (which is within the first 512 bytes) or even to format it. On Linux (raspbian) you should be able to wipe it with something like: dd if=/dev/zero of=/dev/sdX bs=512 count=1 Do...
by jahboater
Thu Dec 31, 2015 4:50 pm
Forum: Beginners
Topic: SD Card Corruption
Replies: 4
Views: 929

Re: SD Card Corruption

If the directory is already a symlink (symbolic link) to an existing tmpfs file system then just leave it - its been done for you. On my Pi2 file /var/run reports that it is a symbolic link to /run as does /var/lock which is a symlink to /run/lock. As memory gets cheaper its more and more common for...
by jahboater
Thu Dec 31, 2015 11:56 am
Forum: Advanced users
Topic: Overclocking: do you do it & how do you check for stability?
Replies: 2
Views: 992

Re: Overclocking: do you do it & how do you check for stabil

I found memtester useful: "sudo apt-get install memtester". Then something like (for the Pi2): "sudo memtester 800m 10" Then add some small CPU bound processes to ensure all four cores are at 100% all the time (check "id" in top - it must be zero). You could also run multiple instances of memtester ...
by jahboater
Thu Dec 31, 2015 11:05 am
Forum: Beginners
Topic: SD Card Corruption
Replies: 4
Views: 929

Re: SD Card Corruption

For Pi2's with their 1GB of memory, I always add the two tmpfs filesystems. Normally when a file is read its last access time is recorded. This is rarely useful and means that for every "read" there is an additional "write". Adding "noatime" is a common optimisation to avoid this. proc /proc proc de...
by jahboater
Thu Dec 24, 2015 8:46 am
Forum: General discussion
Topic: catapult project ( raspberry pi ) - physics - need help
Replies: 98
Views: 12850

Re: catapult project ( raspberry pi ) - physics - need help

If we ignore air resistance, and the catapult launches the projectile at an angle and not vertically, then I presume, knowing the value of g, we could calculate all (maximum height, launch velocity) from the distance the projectile lands from the catapult? Since air drag is extremely difficult to ca...

Go to advanced search