Author Archives: te-bachi

Doppel-Bremshebel / Bremshebel für zwei Bremsen

Doppelzugbremshebel
Dia Compe Tech77 Doppelbremshebel Links schwarz
DIA-COMPE “Tech 77 Double” Brakelever
PROMAX “Double” Brakelever
PROMAX “Polo” Brakelever
Bremshebel, 2-zügig mit Feststellknopf
PAUL “Duplex” Bremshebel

Dimension Double Barrel Left Brake Lever Synchronized
Paul Duplex Dual Pull Brake Lever
Dimension Double Barrel Brake Lever

U.S. Patent 6298744

Kettler Bremshebel mit dem Sie die Vorderrad- + Hinterradbremse gleichzeitig betätigen können US. Patent Nr. 6298744

0170kbs1kbs2kbs3

PHP mit FastCGI

Apache2-Prefork & FastCGI
Apache + Chroot + FastCGI + PHP FAQ
Does PHP work with FastCGI?

mod_fcgid Permission Problems

[Sun Jun 08 21:19:52 2014] [notice] Apache/2.2.27 (FreeBSD) PHP/5.5.12 mod_fcgid/2.3.9 DAV/2 configured -- resuming normal operations
[Sun Jun 08 21:19:52 2014] [info] Server built: May 31 2014 13:29:13
[Sun Jun 08 21:19:52 2014] [debug] prefork.c(1023): AcceptMutex: flock (default: flock)
[Sun Jun 08 21:19:56 2014] [info] mod_fcgid: server 10.0.0.1:/usr/local/etc/apache22/php-wrapper(60862) started
[Sun Jun 08 21:19:56 2014] [warn] [client 10.0.0.10] (53)Software caused connection abort: mod_fcgid: error reading data from FastCGI server
[Sun Jun 08 21:19:56 2014] [error] [client 10.0.0.10] Premature end of script headers: phpinfo.php
[Sun Jun 08 21:19:59 2014] [info] mod_fcgid: process /usr/local/etc/apache22/php-wrapper(60862) exit(communication error), terminated by calling exit(), return code: 255
[root@gateway /usr/local/etc/apache22]# ls -la
-rw-r--r--   1 www   www      109 Jun  8 21:12 php-wrapper
[root@gateway /usr/local/etc/apache22]# chmod 755 php-wrapper

[root@gateway /usr/local/etc/apache22]# ls -la
-rwxr-xr-x   1 www   www      109 Jun  8 21:12 php-wrapper

php5 with mod_fcgid results in 500 error – probably wrong permissions

VirtualHost

#!/bin/sh

SUBDOMAIN=`echo $USER | awk -F_ '{print $1}'`

export PHPRC="$HOME/../.config/php/$SUBDOMAIN"
export PHP_FCGI_CHILDREN=4
export PHP_FCGI_MAX_REQUESTS=300:

exec /usr/local/bin/php-cgi $@

Apache, PHP Fastcgi and PHP_FCGI_CHILDREN
Warum man PHP_FCGI_CHILDREN statt auf “1” lieber gar nicht setzen sollte
php5-cgi fills up memory, too many processes
Apache Module mod_fcgid
Apache with fcgid: acceptable performance and better resource utilization

Apache Module mod_fcgid

Special PHP considerations

By default, PHP FastCGI processes exit after handling 500 requests, and they may exit after this module has already connected to the application and sent the next request. When that occurs, an error will be logged and 500 Internal Server Error will be returned to the client. This PHP behavior can be disabled by setting PHP_FCGI_MAX_REQUESTS to 0, but that can be a problem if the PHP application leaks resources. Alternatively, PHP_FCGI_MAX_REQUESTS can be set to a much higher value than the default to reduce the frequency of this problem. FcgidMaxRequestsPerProcess can be set to a value less than or equal to PHP_FCGI_MAX_REQUESTS to resolve the problem.

PHP child process management (PHP_FCGI_CHILDREN) should always be disabled with mod_fcgid, which will only route one request at a time to application processes it has spawned; thus, any child processes created by PHP will not be used effectively. (Additionally, the PHP child processes may not be terminated properly.) By default, and with the environment variable setting PHP_FCGI_CHILDREN=0, PHP child process management is disabled.

The popular APC opcode cache for PHP cannot share a cache between PHP FastCGI processes unless PHP manages the child processes. Thus, the effectiveness of the cache is limited with mod_fcgid; concurrent PHP requests will use different opcode caches.

Physik: Felder & Wellen

Wikipedia

Elektrischer Widerstand
Spezifischer Widerstand
Driftgeschwindigkeit
Elektrische Stromdichte
Elektrischer Leiter
Ladungsträger
Elektrische Ladung
Elektrischer Fluss
Magnetische Flussdichte
Magnetische Feldstärke

Linienintegral / Kurvenintegral
Oberflächenintegral

Diverse

Magnetische Flussdichte
Magnetisches Feld

physik.hu-berlin.de: Der elektrische Strom mit Driftgeschwindigkeit, el. Leitfähigkeit (PDF)
elektronik-kompendium.de: Stromdichte
bildung-niedersachsen.de: Elektrischer Strom, Ladungsmenge und Stromdichte (gute Bilder)

Vektoranalysis

Vektoranalysis: Teil II, mit Bild von Potential

Bücher

Springer: Gerthsen Physik – Dieter Meschede, Christian Gerthsen
Springer: Physik für Ingenieure – Martin Stohrer, Ekbert Hering, Rolf Martin
Spektrum: Physik für Wissenschaftler und Ingenieure – Paul A. Tipler, Gene Mosca

Eclipse Debugging

GDB

What gdb Does During Startup
GNU GDB Debugger Command Cheat Sheet

--command=<file>, -x <file>    File listing GDB commands to perform. Good for automating set-up.
--batch -x <file>              Run in batch (not interactive) mode. Execute commands from file.

Source Code Directory

Gdb basics
Gdb looks for source files in $cdir (directory embedded in executable recorded during compilation) and $cwd (current working directory). You can add to this list via dir e.g. dir ..\..\WebCore\platform. See current list via show dir. If you need this, it’s a perfect candidate for putting inside .gdbinit file.

(gdb) info sources
Source files for which symbols have been read in:

/home/andreas/src/hcpp/software/app/src/hcpp/ptp2_master.c, [...]

Stack / Stack Trace

GDB corrupted stack frame – How to debug?
Examining the Stack

Watchpoint

Eclipse Help: Adding watchpoints
Watchpoints: Data Breakpoints
Eclipse CDT + GDB: Setting Watchpoints (Juno)

Assembler

Assembly Instruction Stepping
Eclipse GDB in combination with OpenOCD

Scripting

github Gdbinit: A user-friendly gdb configuration file, for x86/x86_64 and ARM platforms
github Gdbinit: gdbinit
Automating GDB Sessions
Automate gdb: show backtrace at every call to function puts

Remote Debugging

$ gdbserver :2345 ./program
Process ./program created; pid = 1851
Listening on port 2345
Remote debugging from host 127.0.0.1
$ gdb
GNU gdb (GDB) 7.5-ubuntu
Copyright (C) 2012 Free Software Foundation, Inc.
This GDB was configured as "x86_64-linux-gnu".
No symbol table is loaded.  Use the "file" command.

(gdb) file ./program
Reading symbols from ./program...done.

(gdb) target remote :2345
Remote debugging using :2345
Reading symbols from /lib64/ld-linux-x86-64.so.2...Reading symbols from /usr/lib/debug/lib/x86_64-linux-gnu/ld-2.15.so...done.
Loaded symbols for /lib64/ld-linux-x86-64.so.2
0x00007ffff7ddb6c0 in _start () from /lib64/ld-linux-x86-64.so.2

Or using Eclipse: C/C++ Remote Application

NIOS II Blinking LEDs

Clock: 125 MHz = 8 ns
Sleep: 8 ns * 125 = 1 us
void sleep_ms(int milisec)
{
    int i;
    int k;
    for (i = 0; i < milisec; i++) {
        for (k = 0; k < 125; k++) {
             __asm("nop");
        }
    }
}

int
main()
{    
    int i = 0;
    int k = 0;
    while (1) {
        k = 1 << i;
        i++;
        av_bus_write_32(HOST_REG_USER0, k);
        sleep_ms(5);
        if (i > 4) {
            i = 0;
        }
    }
    
    return 0;
}

test

root@debian:/usr/src/stanse# CLASSPATH=/usr/src/stanse/tools/ant/cpptasks.jar:/usr/src/stanse/tools/ant/antlr3.jar ant jar

root@debian:/usr/src/stanse# export PATH=/usr/src/stanse/dist/bin:$PATH

export JOB_FILE=/tmp/stanse_jobs
export REAL_CC=gcc
make defconfig
REAL_CC=gcc JOB_FILE=/tmp/stanse_job make CC=stcc all

user@debian:/usr/src/stanse/dist/data/checkers$ ls -la

kernel_pairing.xml



__st_get_cpu_st__


__st_put_cpu_st__


__st_preempt_disable_st__

__st_preempt_enable_st__