Software
Home  Software  About  Links
Somewhat larger projects Utilities Other [ Celebrate 30 years of GNU! ]

Also


About

These are some of the non-paid software & utilities I've written from '93. I chose to include here software that could be useful/reused regardless of its complexity or quality.
This page was created long before cloud based repos like github and bitbucket were founded, and contains mainly software from that era. All software in this page is free (as in speech & as in beer) with source code available.

Legend:


ITDB PHP - IT-oriented office asset management system

Lots of features, check out the web page for more info & screenshots!


check_ramos.pl Perl - nagios plugin for CONTEG RAMOS Mini C temperature/humidity sensors


scsi_rescan Bash - display and rescan scsi hosts and attached devices

Usage:
/\
--
\/
Usage: scsi-rescan.sh [options]
http://www.sivann.gr 

Options:
-i      interactive prompt for rescan
-m       issue device rescan for all matching 
-l      list devices (default with following options)
-g      also show generic scsi devices
-v      also show model/vendor
-p      also show iscsi username/passwords
-s      also show /sys device path
-w      wider output than 80 columns
-r      no-header

Dislpays a list of:
*scsi hosts
*driver name per host 
*block & generic devices per host
*iscsi session IDs per host
*iscsi initiator and target names per iscsi session id.

You are given the option to rescan for new devices for a selected scsi host.
Uses /sys without any external dependencies.

EXAMPLES:
#just list devices in a wide terminal:
#scsi-rescan.sh -l -g -v -p -w
#
##list devices and interactively prompt for rescan
#scsi-rescan.sh -i 
#
##rescan all SATA ports of VIA controller (sata_via kernel module)
#scsi-rescan.sh -m sata_via 
Example:
+--+------+------------+------------------------------------------------------------+------+
|ID| Host | proc_name  | block_devices|generic_devices|model  (Vendor of)           |iscsi |
|  |      |  (module)  |                                    of last device          |sessid|
+--+------+------------+------------------------------------------------------------+------+
| 0|host5 |iscsi_tcp   | sdb|sg2 sdf|sg6 sdk|sg11 sdp|sg17 sds|sg19                 |4     |
| 1|host4 |iscsi_tcp   | sda|sg1 sdd|sg4 sdg|sg7 sdi|sg10 sdn|sg14                  |3     |
| 2|host3 |iscsi_tcp   | sdc|sg3 sdh|sg8 sdj|sg9 sdl|sg12 sdo|sg15                  |2     |
| 3|host2 |iscsi_tcp   | sde|sg5 sdm|sg13 sdq|sg16 sdr|sg18 sdt|sg20                |1     |
| 4|host1 |ata_piix    |                                                            |      |
| 5|host0 |ata_piix    | sr0|sg0                                                    |      |
+--+------+------------+------------------------------------------------------------+------+
iscsi session id: ip/initiator->ip/target :
1: 10.1.2.11/iqn.1993-08.org.debian:01:b1393ecafaa3 -> san_user:xxx@10.1.2.2/iqn.1992-04.com.emc:cx.sl7f2104700005.b1
2: 10.1.2.11/iqn.1993-08.org.debian:01:b1393ecafaa3 -> san_user:xxx@10.1.2.1/iqn.1992-04.com.emc:cx.sl7f2104700005.a1
3: 10.1.1.11/iqn.1993-08.org.debian:01:b1393ecafaa3 -> san_user:xxx@10.1.1.1/iqn.1992-04.com.emc:cx.sl7f2104700005.a0
4: 10.1.1.11/iqn.1993-08.org.debian:01:b1393ecafaa3 -> san_user:xxx@10.1.1.2/iqn.1992-04.com.emc:cx.sl7f2104700005.b0


scsi-rmdev.sh Bash - remove scsi device from system

  1. Umounts device
  2. runs blockdev flushbufs to flush outstanding i/o
  3. removes device


runcached Bash Python C - Execute commands while caching their output for subsequent calls

Includes 3 interchangeable implementations in bash,Python,C, choose the one you prefer. Usefull in zabbix.
GIT Repository is here
runcached (Run Cached)
------------------------------------------------------------------------------
Execute commands while caching their output for subsequent calls. 
Command output will be cached for  seconds and "replayed" for 
any subsequent calls. Original exit status will also be emulated.

After cacheperiod has expired, command will be re-executed and a new result 
will be cached. 
Caching depends on command and arguments executed and the 
path of the runcached executable. Cache results are stored in /tmp

You can use runcached to run resource-expensive commands multiple times, 
parsing different parts of its output each time. Those commands will be
run only once for each cacheperiod. 


Usage:
======
Python:
runcached.py [-c cacheperiod] 

C:
runcached [-c cacheperiod] 

Bash
runcached.sh  


Example:
========

1) The following runs the date command each time you call it, but produces a new "date" every 5 seconds.
runcached.py -c 5 date

2) Query multiple parameters of mysql which correspond to the same time, but run the query once.

UserParameter=mysql.globalstatus[*]/usr/local/bin/runcached.py -c 20 /usr/bin/mysql -ANe \"show global status\"|egrep '$1\b'|awk '{print $ 2}'


netchat C - scripted chat with a remote tcp port

This is like "expect" with basic support for scripted chat. Sometimes tcl and perl based "expect" implementations failed mysteriously while interfacing with a Siemens HiPath communication system so I wrote this in C.
It's very easy to use and works great for chatting to routers, switches and so on via telnet or other ports.
Writes are delayed to accomodate for slow devices. It does not support ssl. Can be called from scripts, php, cgi et.c.
Script files start with hostname and port on first line and each subsequent lines start with WAIT: or SEND:
   Netchat understands these commands:
   WAIT:<string>   waits for <string> (2 seconds timeout)
   SEND:<string>   sends <string>
   INTERACTIVE: control is given to terminal

   example input script file:
   -------------------
   10.1.1.1 23
   WAIT:sername:
   SEND:joe\n
   WAIT:ssword:
   SEND:doe\n
   SEND:who\n
   SEND:exit\n
   -------------------


callstats CPHPSQLITE - Phone Call stats for Siemens HiPath OpenOffice ME

Collect & display call statistics for HiPath OpenOffice ME through the web. It may work with other Siemens HiPath devices. Here's a screenshot], which is self-explanatory. Colors are randomized on each page load
It has 3 parts: Requirements:


netlog C - IP/tcp_port logger. Log data from a tcp source to file.

It is being used by the callstats program above. The same functionality could be achieved with netcat (/usr/bin/nc -d -k -l [port]) but netcat sometimes stopped logging for no apparent reason. This one worked without issues for several years.


ntd PHP - Network Topology Discovery

INSTALLATION: put ntd.php under apache's DocumentRoot. Make its directory writeable by the web server.


ipredirectd C - redirect tcp port to same/other server/port and manipulate data based on regular expressions

This was created in 1999, it is similar to netcat, but has these extra features: Can be used as a "proxy" to forward and reverse-engineer tcp protocols. Data filtering feature is more useful with HTTP. It's a bit smart so as not to apply regular expressions on non-html data by reading the content-type. Regular expressions are read on startup from "toclient.pat" and "totarget.pat" files. Syntax of these files is "<reggex pattern><tab><replacement>". Full lines are searched. If you want to ignore newlines remove the "REG_NEWLINE" flag from regcomp (exists twice in source code) and recompile. One possible usage is redistribution of pre-authenticated web pages in foreign domains by replicating authentication and session cookies.
Example toclient.pat file:
#syntax:<reggex pattern><tab><replacement>
<title>Google</title>   <title>Lalala</title>
Connection: keep-alive  Connection: close
ipredirectd Usage:
IpRedirectd version 0.4 , Spiros Ioannou 1999-2010
Usage: ipredirect  [-d[d]] [-m ] localport targethost targetport
        -d      debug connections
        -dd     debug all traffic
        -ddd    debug also this software
        -x   fork at most n children
        -m      manipulate traffic using to{client,target}.pat


GPS to DTMF MatlabASMCPicBasicBCB - video geotagging: record GPS NMEA information as audio in video files

A circuit that converts NMEA data to audio. That way GPS information can be recorded to the audio channel of a video camera. Such a device can provide the necessary functionality to create your own geotagged videos resembling the "Street Level Zoom" services of Google and MS.


sivterm.zip BCBWIN32 - serial vt100 term

Sivterm was a simple freeware Win32 RS-232 terminal used to replace the buggy hyperterm. Sivterm does not provide file transfer but it's adequate for line monitoring or testing. It can also be used as a console for routers, switches or unix boxes as it implements proper vt100 emulation. Supports all COM ports, viewing port signals as status leds (TD RD CTS RI DSR RLSD), manipulation of DTR and RTS signals (useful for dumb terminals which always expect DTR to be raised to start talking, like some UPSs). It also features a data monitor that can use several representations (ascii, hex, etc). No install needed. SendStrings and Log was never implemented. [screenshot]

The MP3-O-PHONO Project C

This page is about a device (1999) that plays mp3 files from a CDROM. It's a transformed Intel-based PC running Linux and custom software, with an LCD and keypad. It was featured on slashdot and also got some press attention.

XGRK CX11 - Write greek in the X-WINDOW System

X11 keyboard "driver". Probably the first multi-OS multi-keyboarard driver of its sort for greek. It enables to change keyboard mapping with alt-shift or meta-shift combinations or by clicking on the displayed flag image. You will be able to write greek in X programs like netscape, xedit or xterm without the need for a special keyboard or driver. Tested with many hardware platforms & unices including Solaris, IRIX, HP-UX, Linux, FreeBSD, OSX e.t.c.


findrefs.vb VB - Find uncited references/citations in MS Word documents

A collection of visual basic word macros I wrote which do the following: Usefull when writing journal/conference papers. I know I should have stayed with LaTeX which does all this automatically. Table and figure numbers must be entered as captions, and in-text references to them with the "insert->crossreference" menu option.


TimeTrack WIN32BCB - track automatically where your time is spent

For Windows 2000/XP.
You run it, it goes to the systray and measures how much time you spent on each application. It counts seconds/application which has the focus. Source included.


upsesp2 C

Read UPS status with ESP2 protocol. For UPSes like Liebert/Emerson GXT2, NXe, others maybe.
  upsesp2 version 0.4, 05-Apr-2010:
  Usage:
		  upsesp2 <serial device>
  or              upsesp2 <serial device> <UPS parameter>
  example:        upsesp2 /dev/ttyS1 LOAD_WATTS
  The 1st syntax will report a list of supported parameters


upschk C

UPS monitor daemon, for unix- (or POSIX)- compatible OSes. Works with Advance-Intelligent UPSes such as X power Piconet and Micronet, Megatec, Falcon SG, et.c Tested only with the X Power Micronet. This code has been tested with linux & Solaris 2.7. It should compile on other unix boxes with little or no modification. I wrote this in a couple of days to replace the original idiotic java monitoring software (winpower,http://www.ups-software-download.com) that takes up more than 40MB of memory just for monitoring and another 40MB while configuring(!). Moreover, it didn't work at all. The upschk daemon worked fine so far for numerous power-failures.
    usage: upschk  [ -vdi ]
      -v:verbose mode
      -d:daemon mode (forks in bg)
      -i:interactive mode: send cmds to UPS


videograb-0.7.tar.gz C

capture images continuously from a video4linux device and save them in ppm or jpeg. For linux kernels (video4linux).

This is a half-day work, so don't expect much functionality. Besides that, it worked 24/7 for more than three years in our lab with no issues.

Usage: videograb [OPTION]
        -c <num>  number of shots, -1=unlimited (option MANDATORY)
        -i <sec>  interval between shots in seconds (default=4)
        -d <dev>  device to open (default=/dev/video)
        -D <dir>  chdir there
        -q        qcif 176x144 output (defaults to cif 352x288)
        -F        SIF 320x240 output (for philips pcvc665K and others)
        -V        VGA 640x480 output (for philips pcvc665K and others)
        -B        RGB2BGR conversion (for philips pcvc665K and others)
        -s        use sequential filename numbering (out1,out2...)
        -f <str>  filename prefix (used with -s, default=out)
        -v        be verbose
        -b        run in background as a daemon
        -t <int>  set brightness (i.e. 30)     
        --------- JPEG OPTIONS -----------------------------------
        -j        save output as jpeg (default = ppm)
        -O        coding optimization  (default=no)
        -Q <num>  quality factor [0-100] (default=60)
        -S <num>  smoothing factor [0-100] (default=0)
	-l        link last saved file as current0.jpg 
	-L        link last saved file as current1.jpg 


SMFE BCB - S.M.F.E. Simple M.A.M.E. Frontend

My new M.A.M.E. Front End (WIN32). This is the only one that works for me :-)


fr(uskb).zip - Write French in Greek/US/qwerty keyboards (MS Windows)

Using dead-keys to input accents. Made with MSKLC 1.4. Uncompress and run setup.exe.
Acute:[vowel, Grave:]+vowel, 
circumflex:{+vowel,  umlaut:}+vowel, 
cedille: RightAlt+c OE:RightAlt+o AE:RightAlt+A

RightAlt=AltGr=Ctrl+Alt
RightAlt is missing in some keyboards. Use Ctrl+Alt instead.


Vector clock screensaver AS

Rotating circular clock with minutes shown as a 2nd circle rotating both arroudn the big circle and arround itself. Both vector and raster versions included. Screenshot. I made this as a screensaver based on the logo of my previous employer (Hellenic National Audiovisual Archive). eoa-clock-flash.7z


qpopper patches C

Qpopper patch code to make it work correctly with hard quotas. Changes the locking mechanism, to avoid having an empty spool file after reading mail when you are near your quota and new mail arrives. Includes changed files for qpopper 4.05 and 4.08: popper-ntua.tar.gz


audioctrl C

Change audio settings on Solaris 6/7/8 without audiocontrol. It's both command line and interactive: audioctrl.c
And yes the code sucks :-)


whereami C - display your remote host taken from utmp

useful for scripts

whowasi C - display your tty owner

Display your original uid/username after entering in a suid shell. Taken from the owner of the controlling terminal.


ttystatus.tar.gz C

Display serial port status. Includes sources for linux, solaris, hpux. Use statserial if you have it.

dos928.zip 8086 ASM - Write ISO-8859-7 (ELOT-928) in DOS. TSR keyboard driver.

This set of programs is an addition to the Angelos Karageorgiou's vgagreek DOS greek keyboard driver. The additions/modifications enable DOS programs to support the ELOT-928 (iso-8859-7) character set. Includes support for accented capitals, accented with diaeresis, and the middle dot (ano telia). This set includes a keyboard driver (TSR, x86 assembly) and vga fonts.


Various C sources, mostly mine

Mostly POSIX & unix.


Projects from some NTUA courses

here