Listeaza procesele ce in comanda de start a lor cuprind cuvantul polipo: ps -C polipo -o pid,pcpu,pmem,rss,state,stat,start,time,nlwp,args ps -C stunnel -o pid,pcpu,pmem,rss,state,stat,start,time,nlwp,args ps -C java -o pid,pcpu,pmem,rss,state,stat,start,time,nlwp,cmd ps -C httpd -o pid,pcpu,pmem,rss,state,stat,start,time,nlwp,cmd ps -C php-cgi -o pid,pcpu,pmem,rss,state,stat,start,time,nlwp,cmd Listeaza procesele userului […]
Zyxel NSA310 info
Packages (compiled by me) for Zyxel NSA310: https://adrhc.go.ro/ffp_0.7_packages/packages/ Fonz Fun Plug repositories: fonz http://www.inreto.de/ffp/0.7/arm/PACKAGES.html adrhc https://adrhc.go.ro/ffp_0.7_packages/packages/ Mijzelf http://downloads.zyxel.nas-central.org/Users/Mijzelf/FFP-Stick/packages/0.7/arm Uli rsync://funplug.wolf-u.li/funplug/0.7/arm/packages Uli http://funplug.wolf-u.li/0.7/arm/packages/ -> URL la care vad packages KyleK http://kylek.is-a-geek.org:31337/files/ffp/0.7-arm Memiks http://ffp.memiks.fr/pkg/ barmalej2 http://downloads.zyxel.nas-central.org/Users/barmalej2/ffp/0.7/arm/packages https://adrhc.go.ro/pkg/ffp/?0.7/arm,not_chrooted -> info page about Fonz […]
Zyxel NSA310 and Java 8
tar xvzf ejdk-8-fcs-b132-linux-arm-sflt-03_mar_2014.gz cd /ffp/home/root/ejdk1.8.0/bin #Modifica /ffp/home/root/ejdk1.8.0/bin/jrecreate.sh cu “java -Xms128m -Xmx192m”. ./jrecreate.sh –vm client –dest ~/jdk1.8.0-full-cli+ext –no-compression –extension locales,charsets -v ./jrecreate.sh –vm client –dest ~/jdk1.8.0-full-cli –no-compression -v
dos2unix
Conversie dos -> unix recursiva: find . -type f -name “*.sh” -exec dos2unix {} \; Compilare dos2unix: “ENABLE_NLS=” -> inseamna ca se dezactiveaza NLS (altfel pur si simplu nu gaseste ceva de libintl) make prefix=/ffp ENABLE_NLS=
Ubuntu: Enabling the root account
Enabling the Root account is rarely necessary. Almost everything you need to do as administrator of an Ubuntu system can be done via sudo or gksudo. If you really need a persistent Root login, the best alternative is to simulate […]
Linux kill command
pkill cupsd kill pidof cupsd
-> pidof transmission-daemon
e ok dar pidof transmission
nu e ok kill pidof "Plex Media Server"
kill pgrep transmission
-> pgrep transmission
e ok dar pgrep transmission-daemon
nu e ok kill `ps ax -o pid,args […]
Mysql command line
connecting to exifweb database: mysql -u exifweb -p use exifweb insert into AppConfig values (null, ‘false’, ‘cpu summary: use sum on ps aux command’, now()); exit or CTRL+D # https://dev.mysql.com/doc/mysql-utilities/1.6/en/mysql-utils-intro-connspec-mylogin.cnf.html # avoid warning for commands like: mysql -u root […]
Mysql backup
mysqldump –ignore-table=exifweb.Image –databases exifweb –skip-comments -u root –password > 2014-08-28\ exifweb.sql mysqldump -u root –password exifweb Image > 2014-08-28\ exifweb\ Image\ only.sql mysqldump -u root –password –databases exifweb > 2014-08-28\ exifweb.sql mysqldump -u root –password exifweb | gzip > exifweb.sql.gz […]
Mysql EXPLAIN select
EXPLAIN EXTENDED select albumcover0_.id as id15, albumcover0_.dirty as dirty25, albumcover0_.imageHeight as imageHei35, albumcover0_.imageWidth as imageWid45, albumcover0_.imgName as imgName55, albumcover0_.name as name65 from v_albumcover albumcover0 order by albumcover0_.name DESC
CPU information
Processor information (cpu info): cat /proc/cpuinfo CPU count: wc -l /proc/net/softnet_stat Features: swp half thumb fastmult edsp /bin/dmesg | grep ‘ARM’ http://unix.stackexchange.com/questions/43539/what-do-the-flags-in-proc-cpuinfo-mean gcc -march=native -mtune=native -Q -O2 –help=target http://www.oracle.com/technetwork/java/embedded/embedded-se/downloads/javase-embedded-downloads-2209751.html ARMv5 Linux – Headless EABI, SoftFP ABI, Little Endian3 The MarvellĀ® […]
Compiling memcached
cd $HOME/compile wget http://memcached.org/files/memcached-1.4.21.tar.gz tar xvzf memcached-1.4.21.tar.gz cd $HOME/compile/memcached-1.4.21 #export PATH=/ffp/sbin:/usr/sbin:/sbin:/ffp/bin:/usr/bin:/bin:/ffp/opt/ejre1.7.0_60/bin export LDFLAGS=”-L/ffp/lib -lintl” export CPPFLAGS=”-I/ffp/include -I/ffp/include/readline -DLINUX” export CXXFLAGS=”-I/ffp/include -I/ffp/include/readline” export CFLAGS=”-march=armv5te -mtune=xscale -mfloat-abi=soft -mabi=aapcs-linux -pthread -O2 -lintl -Wall” export LC_ALL=POSIX export PKG_CONFIG=/ffp/bin/pkg-config ./configure –help > configure.help.txt ./configure –prefix=/ffp […]
Compute linux version code
Linux version.h: LINUX_VERSION_CODE is X65536 + Y256 + Z e.g. Linux 2.6.31.8: LINUX_VERSION_CODE = 265536 + 6256 + 31 = 132639 root@nsa310:~# cat /ffp/include/linux/version.h #define LINUX_VERSION_CODE 132639 #define KERNEL_VERSION(a,b,c) (((a)
Compiling Apache 2.2.9
rm -r ~/compile/httpd-2.2.9-unpacked cd ~/compile && mkdir httpd-2.2.9-unpacked tar xvzf httpd-2.2.9.tar.gz -C ./httpd-2.2.9-unpacked cd ~/compile/httpd-2.2.9-unpacked/httpd-2.2.9 find . -type f ( -exec sed -i s/”\/usr\/bin\/bash”/”\/ffp\/bin\/bash”/ {} \; , -exec sed -i s/”\/usr\/bin\/sh”/”\/ffp\/bin\/sh”/ {} \; , -exec sed -i s/”\/usr\/bin\/env”/”\/ffp\/bin\/env”/ {} \; […]
Library rpath si Library runpath
ATENTIE, am manarit referintele la librarii (vezi /etc/ld.so.conf). Vezi Library rpath si Library runpath cu: readelf -d /usr/sbin/httpd http://en.wikipedia.org/wiki/Rpath: At run time, if the dynamic linker finds a DT_RUNPATH attribute, it ignores the value of the DT_RPATH attribute, with the […]