RSS    Archive    SEARCH

|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||

Delay Line Memory...

================================================================================================================

[ meskarune@delayline.tk : ~$ ls -lrt /var/log/mind > blog ]

================================================================================================================

03/29/2012 16:42:36

Get your WAN IP Address

curl ifconfig.me

----------------------------------------------------------------------------------------------------------------

09/17/2011 19:37:05

Driftnet: Display images from TCP Streams (aka, spy on people)

----------------------------------------------------------------------------------------------------------------

09/16/2011 19:36:05

Cool HTML editor for Gnome

----------------------------------------------------------------------------------------------------------------

09/15/2011 19:32:05

My Favorite Text Editor

I like vim, I really do, but its not the text editor I use when I’m writing html/css or LaTeX or php… The editor I generally go to when I’m getting down to business is TEA. It is very fast, has great syntax highlighting, templates, and a built in image viewer. I love this editor. :)

Features from the Site:

  • Small size
  • Built-in MC-like file manager
  • Spellchecker (using the aspell or/and Hunspell)
  • Tabbed layout engine
  • Syntax highlighting for C, C++, Bash script, BASIC, C#, D, Fortran, Java, LilyPond, Lout, Lua, NASM, NSIS, Pascal, Perl, PHP, PO (gettext), Seed7, TeX/LaTeX, Vala, Verilog, XML, HTML, XHTML.
  • Multiply encodings support
  • In-text labels (markers) support
  • Code snippets and templates support
  • Scripts (Python, Perl, Ruby, Bash script, QtScript)
  • Hotkeys customizations
  • “Open at cursor”-function for HTML-files and images
  • Misc HTML tools
  • Wikipedia, Docbook, LaTeX, Lout editing support
  • Preview in external browsers
  • String-handling functions such as sorting, reverse, format killing, trimming, filtering, conversions etc.
  • Bookmarks
  • Morse code translator
  • Calendar/organizer
  • Drag’n’drop support (with text files and pictures)
  • Built-in image viewer (PNG, JPEG, GIF, WBMP, BMP, SVG, TIFF, TGA, etc.)
  • Built-in image converter and resizer
  • Built-in ZIP packer/unpacker with file names charset selector
  • RMS calculation for 16 bit PCM WAV’s

Tea runs on Linux and Windows. It has a GTK and QT branch. And its fast, featureful and nice to use. Check it out here: 

http://tea-editor.sourceforge.net/

Tea Screenshot, showing HTML syntax highlighting

My favorite thing about tea is the input field on the bottom. Its sorta like a terminal for the editor. :)

----------------------------------------------------------------------------------------------------------------

09/14/2011 17:33:42

Head Tracking for Gnome/Linux

----------------------------------------------------------------------------------------------------------------

08/08/2011 15:10:53

Kernel Log: First release candidate for Linux 3.1 - The H Open Source: News and Features

reallinux:

The Heise Kernellog summarizes the happenings in the development of the Linux Kernel in a short and easy to understand form.

I just installed the 3.1 Kernel, so guess I’ll see how it goes when I reboot! 

----------------------------------------------------------------------------------------------------------------

08/03/2011 18:50:00

Linux: Will Open Justitia become opensource?

reallinux:

The Swiss federal court has developed a software to make the management of court decisions easier and planned to release the software under the GPLv3.

However, just before the source code was to be released, the process was stopped.
Several companies that develop proprietary software for Swiss…

----------------------------------------------------------------------------------------------------------------

08/02/2011 13:22:24

Linux System logs

All of the Log Files on Linux are located in /var/log

If you type “tail /var/log/messages.log” you will get the last 10 messages on your system log file.

On my computer when I typed “tail -n 3 /var/log/messages.log” it shows the last 3 entries of my system log, which looked like this:

Aug 2 12:06:59 localhost avahi-daemon[1343]:New relevant interface wlan0.IPv4 for mDNS.

Aug 2 12:06:59 localhost avahi-daemon[1343]: Registering new address record for <my-ip-address> on wlan0.IPv4.

Aug 2 12:06:52 localhost dhcp[2964]: forked to background, chid pid 2990

Common Linux log files name and usage

  • /var/log/messages.log: General message and system related stuff
  • /var/log/auth.log: Authenication logs
  • /var/log/kern.log: Kernel logs
  • /var/log/cron.log: Crond logs (cron job)
  • /var/log/maillog: Mail server logs
  • /var/log/httpd/: Apache access and error logs directory
  • /var/log/boot.log : System boot log
  • /var/log/mysqld.log: MySQL database server log file
  • /var/log/secure: Authentication log
  • /var/log/utmp or /var/log/wtmp : Login records file

You can use these log messages to check up on boot errors, to see who’s been logged into your system, or check on your cron jobs. 

Besides tail, you can also grep (search) your log files for specific terms. An example would be searching all the logs in /var/boot for the word “fail”

example: “grep -i fail /var/log/boot

this would then list all the instances where boot failed. 

There are also a ton of 3rd party log viewers, both FOSS and Proprietary, available for linux. These log viewers often have features like log analysis, tracking, etc. Which can make finding issues a lot easier. 

Ksystemlog for KDE

http://www.kde.org/applications/system/ksystemlog/

Gnome log viewer for gnome

http://library.gnome.org/users/gnome-system-log/

AWstats for web servers (its pretty impressive and their site has a demo you can check out)

http://awstats.sourceforge.net/

Cyclops, a CLI log analyzer (it only shows log entries with errors/suspicious behavior)

http://tam.hiddenrock.com/projects/cyclops/

There are hundreds more, and I would suggest you check out your distribution’s software packages or start a forum thread for recommendations. :) 

Oh and one more extra tip: 

You can have your system log messages show up in conky - the desktop system information program. Just stick this entry into your conky:

${execi 30 tail -n3 /var/log/messages}

----------------------------------------------------------------------------------------------------------------

08/01/2011 14:36:00

Having Fun with Strace

Strace is a program that shows the system calls a program makes as well as signals received from the user or other sources. Each line in the trace contains the system call name, followed by its arguments  in  parentheses  and  its  return value. 

meskarune ~/Desktop $ strace echo hello

execve(“/bin/echo”, [“echo”, “hello”], [/* 29 vars */]) = 0

brk(0)                                  = 0x8c04000

mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb78cf000

access(“/etc/ld.so.preload”, R_OK)      = -1 ENOENT (No such file or directory)

open(“/etc/ld.so.cache”, O_RDONLY)      = 3

fstat64(3, {st_mode=S_IFREG|0644, st_size=140504, …}) = 0

mmap2(NULL, 140504, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb78ac000

close(3)                                = 0

open(“/lib/libc.so.6”, O_RDONLY)        = 3

read(3, “\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\220\223\1\0004\0\0\0”…, 512) = 512

fstat64(3, {st_mode=S_IFREG|0755, st_size=1467012, …}) = 0

mmap2(NULL, 1473000, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7744000

mmap2(0xb78a6000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x162) = 0xb78a6000

mmap2(0xb78a9000, 10728, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb78a9000

close(3)                                = 0

mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7743000

set_thread_area({entry_number:-1 -> 6, base_addr:0xb77436c0, limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0, useable:1}) = 0

mprotect(0xb78a6000, 8192, PROT_READ)   = 0

mprotect(0xb78f0000, 4096, PROT_READ)   = 0

munmap(0xb78ac000, 140504)              = 0

brk(0)                                  = 0x8c04000

brk(0x8c25000)                          = 0x8c25000

open(“/usr/lib/locale/locale-archive”, O_RDONLY|O_LARGEFILE) = 3

fstat64(3, {st_mode=S_IFREG|0644, st_size=1852464, …}) = 0

mmap2(NULL, 1852464, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb757e000

close(3)                                = 0

fstat64(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), …}) = 0

mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb78ce000

write(1, “hello\n”, 6hello

)                  = 6

close(1)                                = 0

munmap(0xb78ce000, 4096)                = 0

close(2)                                = 0

exit_group(0)                           = ?

In the above example I ran “echo hello” through strace. As you can see, the echo program was executed from /bin and access’s quite a few library modules before actually writiing “hello” to the screen. When a value -1 is shown, that mean’s there was an error with the program. If you have a program that crashes upon loading, using strace can help you figure out what the problem is. Strace is also useful to help new users learn what libraries and modules a program uses when it is executed. Try running strace on ls, cd or vim!

----------------------------------------------------------------------------------------------------------------

07/30/2011 20:03:05

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore all progress depends on the unreasonable man."

--George Bernard Shaw

----------------------------------------------------------------------------------------------------------------

pg 1 of 3