Showing posts with label linux. Show all posts
Showing posts with label linux. Show all posts

Tuesday, October 1, 2013

Want to know what dd is doing?

From another terminal type kill -USR1 $pid, where pid=`pidof dd`. This causes dd to spit out data speeds and amounts transferred so far. you might wrap it up in something like:  
pid=`pidof dd` 
while [[ -d /proc/$pid ]]; 
do kill -USR1 $pid && sleep 5; 
done
Apparently pidof is deprecated or something?? If you only have one dd process running on your machine you might try pkill -USR1 -n -x dd the problem here being that you will keep asking for the pid of dd, and might get new ones. The -n is for the newest process, -o for the oldest, and leave it out completely to send to all running dd processes, like this:

pkill -USR1 -x dd 
enjoy.

Sunday, June 23, 2013

Bricked my Galaxy Note (Soft Brick Phew!)

Very intense day today as I luckily only soft bricked my GT-N7000. Got stuck in bootloop after an unsuccessful rom upgrade when returning to nandroid backup. And no i didn't use stupid stock ICS kernel. Reflashed stock rom with Odin and it decided to fail :-O, redid it and felt very lucky when it worked! back to stock JB 4.1.2 not going to flash for a whiles now.


Wednesday, August 15, 2012

Netgear ReadyNAS NV+ V2 (RND4000)

Just bought one of these for €200. It's a compromise on price performance. I wanted 1 gigabit read/write, but would have to shell out a lot more to approach these figures. The unit looks good. As you may have read in other reviews the drive bays are way too accessible and easy to take out. The drive comes bundled with power cables and a CAT5 cable. Why is this gigabit ethernet unit not bundled with at least a CAT5e cable? Just installed a 3TB drive in the unit. Powered it up and was pleased to see it was updating it's own firmware automatically. Had to quickly install Radar Utility as the NAS was giving me 10 minutes until assumedly it would do a default configure on the drive/system. The choices were set up XRAID2 or some regular RAID system. I'll be buying my disks one at a time so I'm going to try out their XRAID sytem I've been reading about. Dissappointed to note there is no FTPS option, only vanilla unsecure FTP sever available. [Explicit FTPS available, be careful not to use plain FTP by accident if you wish your password to be secure.] Speedtests to come... folder -quick write test coming in at a lowly 25MB/s to write to NAS thru SMB, 4GB folder of videos files. -rough read test comin in at 40MB/s, same folder of file. caching may have occurred. -write 1GB file 39/MB/s -read 1GB file 42MB/s looks like caching again maybe. Tried folder write again, now writing at ~40MB/s, definitely caching occurring. Copying large 11GB file to NAS 32MB/s. Something strange occurring. Tried connecting direct using only CAT6 and staic IPs and began copying 11GB file. was getting less than through my shitty UPC router. Came in around 30MB/s, definitely less than though router anyhow. ================================================= OK, several days just passed there. got locked out of web control for NAS kept saying "Device is Offline", reinstalled OS, did factory reset, finally was sayin corrupt root. after much searching found that my Seagate drive ST3000DM001 had firmware CC4C. In the readynas hardware compatability list it was recommended to upgrade to CC4H. -and fuck seagate for being so awkward in the update, but that's another story, just make sure you have a bog standard pc hanging around if ya wanna upgrade seagate firmware, with an intel chip, working optical drive, no raid array, and on my annoying set up i basically had to unplug everything to disconnect the PCs own hard drives, or else the upgrade utility would mercilessly try and upgrade every HD it came across. i had to do this about 3 times in the end, was getting pretty pissed off. finally got firmware -> CC4H. still getting "Device is Offline" AAAAHHHHHHH!!!!!!!! next factory restore -> err: partitioning failed / corrupt root hooked the drive back up to PC (3rd time disassembling PC :-/) tried deleting any partitions on HD -> nothing found motherboard cannot read 3TB drives, created new empty partition windows prompts for MBR or GPT, do some interesting reading and go for GPT (Guid Partitioning Table). Discover some interesting shit about these new >2TB drives, they're all secretly aligning on 4k bytes instead of 512. can cause double write if misaligned blocks! does this explain my slow write speed in initial testing? put HD back in NAS, left to test drive overnight -> err: could not mount root RAID d / corrupt root factory reset -> err: partitioning failed OS reinstall -> auto does factory reset >> test disks >> installs FW >> installs X-RAID!! >> creates volume!! >> does normal boot :-) did a quick test there with 11GB file, writing at 40MB/s thru router no problems. reading at 42MB/s. top speed of the routers switch was measured at 50MB/s with iperf. May have to invest in switch if i can justify the expense, will need to do some more testing direct thru cable and when i get more HDs installed in the NAS. Pretty bumpy ride so far, i bought the NAS so i wouldn't have the bumpy ride and expense of building my own NAS. The joys of IT eh? It's always a learning experience.

Thursday, August 2, 2012

Ubuntu 10 (Lucid Lynx) Linux Post-Install Set Up Tips

***just found this post in my drafts folder on blogger, a little out of date at this point as i wrote it at least 1.5 years ago***

1) don't use 64-bit unless you have more than 3.5 GB of RAM installed. more trouble than it's
worth.

2) to change minimize, maximize, close window buttons from left side to right side of top of window:

run gconf-editor and go to /apps/metacity/general/button_layout
change from "close,minimize:" to "menu:minimize,maximize,close"

3) get the win key working:

run gconf-editor and go to /apps/metacity/global_keybindings

change any of these values to "Super_L" to have the win key open that application

e.g. run_command_terminal = Super_L to have the win key open a new terminal window

or panel_main_menu = Super_L to have a similar function to windows by opening the gnome application menu

4) This is general firefox on linux tweak. To set the backspace key to go back a page in history, open a new tab, type "about:config" in the address bar, dismiss the warning and type "backspace" into the filter bar. double click the browser.backspace_action entry and set the value to "0" (zero). As far as I remember "2" is to scroll one screen up in the current page.
This makes sense when used in conjunction with the space bar to scroll down one screen in a page.

Wednesday, May 2, 2012

Just got a Samsung Galaxy Note GT-N7000 !!

Just received this by courier! Fantastic, it's huge!

















Right hand side is level with a UK / IRL size electricity plug.

Thursday, October 27, 2011

Thursday, February 17, 2011

Alternative to "The C Programming Language by Kernighan and Ritchie"

Found a great book for learning C. Lesson 1 is the usual "hello world", but literally the next example dives into using it as a CGI script. It teaches all the usual C console output stuff, but concentrates on web programming with C and apache web server. This is great, as the terminal is a bit boring looking for the uninitiated, and most ppl are used to booting up and instantly firing up the web browser to click aimlessly on social networking sites.

It includes clean code examples, and moves rapidly on to interacting with mysql and creating images on the fly, while still learning about loop structures etc. At 84 pages of breakneck speed learning, I'd love to hear how a novice gets on with this book. I'm a relatively seasoned C/C++ programmer and I'm still getting mileage out of it.

"C Programming in Linux" by David Haskins.

Download pdf & examples (for free!) here: http://bookboon.com/external/computerweekly/it/c-programming-in-linux
(If your not a UK IT student just put "abroad" and "other" in drop downs).

Tuesday, November 23, 2010

Put Archlinux on my eee pc 901

I decided to wipe eeebuntu 8.04 from my eee pc 901. I have put on archlinux which turns out to be great! you have a lot more control of ur installation with archie, and i've gone for a very lightweight approach to suit my netbook. No desktop environment, just using openbox window manager, and carefully chosen each application to get exactly what i want.

A non-exhaustive list-
Programs)
Terminal: roxterm (mainly), xterm
Editor: vim (general), geany (IDE)
Network Manager: wicd (great! ncurses+GUI)
File Manager: pcmanfm (weaning myself off nautilus) nautilus, mc (ncurses)
Video Player: mplayer (no fancy GUI for me, plenty of shortcut keys) smplayer(FTW!)
[Video Editor: avidemux-gtk]
Music Player: audacious (haven't looked into this much seems ok screen space wise)(great!)
Office: openoffice, epdfview
Archive: xarchiver
Graphics: gimp, mirage [added eog as mirage a bit slow]
Browser: lynx, firefox (main), chromium
System)
Window Manager: openbox
Wallpaper: set with feh (extremely lightweight!)
System info: conky & tint2 various tray apps
Tray/Panel/Dock: tint2 lxpanel
Compositing Manager (transparency, effects): xcompmgr
Audio: alsa, alsa-utils (alsamixer)
GUI Configurators: obconf, obmenu, tint2conf

That's all i can think of right now.

TODO:
Network shares are not mounting automatically for some reason [-requires root?], [or SD card]
haven't thought about bluetooth,
must work on speeding up boot process (no autodetecting modules really speeds things up). [never switch off/reboot]
Must setup scripts to move ~/.mozilla folder to RAM on system start, and sync to disk on system shutdown. [Done! But for aforementioned reason sync it with cronjob, and logging in or out of bash for good measure. Use rsync as it just updates changes to disk rather than full copy (good for SSD drive)].

Otherwise coming together nicely.
Click for screenshot of 9.1 inch screen:

Have since dicked around with a custom minimal gtk theme, made the windows title bars as small as possible to save screen real estate -may just ditch em all together and use shortcut keys? Every program has been visually miniaturized as much as reason would allow.

Conky now calls a script that reads battery level values from the filesystem and colours the battery display accordingly, e.g. red below 5%.
TODO: add functionality to the script to send notifications and suspend2ram. Need to keep it simple as script is called every ~2 secs.

Wednesday, September 29, 2010

Ubuntu 10 (Lucid Lynx) Linux Post-Install Set Up Tips

1) don't use 64-bit unless you have more than 3.5 GB of RAM installed. more trouble than it's
worth.

2) to change minimize, maximize, close window buttons from left side to right side of top of window:

run gconf-editor and go to /apps/metacity/general/button_layout
change from "close,minimize:" to "menu:minimize,maximize,close"

3) get the win key working:

run gconf-editor and go to /apps/metacity/global_keybindings

change any of these values to "Super_L" to have the win key open that application

e.g. run_command_terminal = Super_L to have the win key open a new terminal window

or panel_main_menu = Super_L to have a similar function to windows by opening the gnome application menu

4) This is general firefox on linux tweak. To set the backspace key to go back a page in history, open a new tab, type "about:config" in the address bar, dismiss the warning and type "backspace" into the filter bar. double click the browser.backspace_action entry and set the value to "0" (zero). As far as I remember "2" is to scroll one screen up in the current page.
This probably makes sense when used in conjunction with the space bar to scroll down one screen in a page.

[EDIT] On that note i thought it might be good if the space bar did go forward in history one page. There are no settings in firefox/mozilla for this, so i delved into the world of greasemonkey to make this possible.

Here's my first greasemonkey script!

It adds an event listener for keydown (key events are not available by default in greasemonkey),
checks for space bar press (it assumes the code for space bar is 32),
goes forward 1 page in history,
& suppresses the default behaviour for space bar (i copied that bit, don't really know what it does)

here's de code:



// ==UserScript==
// @name Space Forward
// @namespace http://mcmonkeys1rants.blogspot.com
// @description Makes space bar go forward in history and not scroll down
// @include *
// ==/UserScript==

function KeyCheck(e)
{
if(e.keyCode==32){
history.go(1);
if(!document.commandDispatcher.focusedElement)
e.preventDefault();
}
}

window.addEventListener('keydown', KeyCheck, false);



pretty basic, but it works!

5) Get rid of F10 menu accelerator, ("ALT+F" works fine, and "F10" interferes with midnight commander quit key):
run gconf-editor and remove "F10" from /desktop/gnome/interface/menu_accel (i.e. set="")

6) Set up SMB N/W share mounts:
make sure smbfs & smbclient are installed.
add this horrible line to /etc/fstab (all in one single line)
//192.168.1.13/public /media/public cifs user=netusername%netpassword,directio,soft,noexec,nosuid,nodev,rw,uid=1000,gid=1000,file_mode=0664,dir_mode=0755 0 0
-subbing in your network login for "netusername" & "netuserpassword", and your own network locations and local mount points.
i wrote that some time ago, most of the option are not required, i was trying to stop the local PC from hanging when my NAS went down.
don't for get to "sudo mkdir /media/public" or whatever you'll name them.

[EDIT/EDIT]
OK I'LL PROBLY TURN THIS INTO A WHOLE NEW PAGE SOMEWHERE FOR MY OWN REFERENCE MORE THAN ANYTHING. I've gone thru this process so many times when installing new OSes that i should probly keep a record rather that rediscovering de same ould carp (esp. linux).

right, i've been busy, must say i'm lovin de look n feel of ubuntu 10, and so many previously annoying linux things are seemless now (e.g. wireless networking, and ACPI -yes! that used to be a problem! anyone remember havin t write/download specifics for their broken BIOSes?? twas hell i tell thee, but auto shutting down before ur laptop's battery emptied was a must! i digress, n fuck all ppl would get this. i.e. praise be linux kernel 2.6 and the copping on of Dell and the like).

all what follows is pretty personal to my own system.

gonna need an autostart file -right it appears that system/preferences/sessions no longer exists, now it's the more intuitive system/preferences/Start Up Programs, duh! i had to google that, stuck in me ould ways. tsk.

have a few config files i reuse: .conkyrc, .fehrc, .fehbg, .bashrc, .vimrc
install the relevant apps: vim, conky, feh.
will post config files when i set up a new space for this, good to have somewhere, maybe someone else can benefit as i've carried these for years n spent a lot of time on them.
java is an annoyance on ubuntu, they insist on openjdk/icetea/gcj and there all still shit slow and have incompatibilities with java proper. PAIN! as i do program in java, and java apps? well, they are slow enough as it is -raw C/ASM baybee!! fuck de rest. n fk u java queers, real men use C/C++/
have a new step by step for keeping java up to date manually -post that also on new "space".
that's all i'll post now. DEFO GET BACK THIS!