Archived entries for

understanding freebsd memory usage

I think it is better to write in english, since I’m often googling around about some problem and land on a site in chinese with some configuration pasted in the site.

The problem is I don’t know what poor chinese boy wrote: “This configuration is working for me:” or “This configuration is not working at all, can someone help me:”. So I try it. Never worked.

Recently I found a post which nicely describes statuses of FreeBSD memory allocation.

Top shows:

Mem: 4589M Active, 13G Inact, 489M Wired, 733M Cache, 214M Buf, 886M Free

And the snip from the post:

Memory normally moves along the following path:

Wired -> Active -> Inactive -> Cached -> Free

and then when it gets allocated and used it moves back to Wired.

The difference between the categories is mainly that “Inactive” and
“Cached” memory still contains data that the system might be able to
reuse, while “Free” memory is completely free and unused.
In order to use Cached or Inactive memory it might need to be flushed
first, with Inactive probably being dirty and Cached probably not.
(“Active” memory is almost certainly dirty and is therefore somewhat
more expensive to reuse.

samouničenje FreeBSD-ja

Ker je jutri srečanje blogerjev, jaz pa že skoraj pol leta nisem nič napisal, imam slabo vest in pišem…

Po svetu imam kar nekaj strežnikov in pride čas, da strežnik zamenjam za novega, ob tem pa nočem da podatki pridejo v roke “nasledniku” strežnika. Poleg varnega brisanja datotek sem si vedno želel pognati kakšen destruktiven ukaz, ki bi strežnik zares pokončal.

Takoj pride ideja, dd !! Vendar je FreeBSD malo zaščitniški glede pisanja po raw diskih:

[root@dolfi ~]# dd if=/dev/zero of=/dev/da0
dd: /dev/da0: Operation not permitted

Rešitev se skriva v sysctl zastavici. Hvala, bc !

[root@dolfi ~]# sysctl kern.geom.debugflags=16

po spremembi zastavice, bo dd deloval. Uničujoče. Poskusite v službi.

Je že pospeševalec delcev uničil svet ?

http://www.hasthelargehadroncolliderdestroyedtheworldyet.com/

Lahko se tudi naročite na RSS feed…

openssh as SOCKS proxy

Tokrat ne bom pametoval ampak vas usmeril na dober opis openssh-jeve SOCKS funkcionalnosti.

Hvala, Miha ! :-)

OpenSSH Socks proxy | secure browsing

ssh bouncing

Ojla,

danes mi je bilo dovolj skakanja po serverjih, da dosežem server, ki je za tem serverjem. Po malo raziskovanja je tukaj način, kako “bouncnat” na strežnik preko drugega strežnika. spet ~/.ssh/config:

Host secret
ProxyCommand ssh bounce.server.net 'nc secret.siel.si 22'

in potem samo “ssh secret”. Seveda pa imate postavljenega ssh agent, tako da proces steče brez vpisovanja gesla.

Na bounce serverju mora biti instaliran netcat.

FreeBSD mount_smbfs .nsmbrc

Tale je za v arhiv, ker naslednjič bom vedel, da sem stvar že rešil, ampak ne kako…

Torej za avtomatski mount windows share-a iz /etc/fstab je konfiguracija sledeča…
/etc/fstab:
//BACKUP_USER@BACKUP_SERVER/BACKUP_SHARE /back/ar4 smbfs rw,-N 0 0

~/.nsmbrc:
[default]
workgroup=WORKGROUP
[BACKUP_SERVER]
addr=10.10.10.10
[BACKUP_SERVER:BACKUP_USER]
password=geslo

tcpdump – syn paketi

Kar bi rekel, da bo sila enostavno, se izkaže da niti ni. Če želite da tcpdump kaže samo SYN pakete:

tcpdump -i ime_vmesnika -n 'tcp[tcpflags] & tcp-syn != 0'

Konec počitnic… s.

hitrejsi ssh !

v ~/.ssh/config vpišete:

ControlMaster auto
Host *
ControlPath ~/.ssh/master-%r@%h:%p

in druga seja do istega strežnika se bo zgodila v trenutku !

Happy ssh !

komentiranje v vi-ju

Jap, vi je se uporabljen editor :-)

:.,+N s/^/#/
kjer je N število vrstic, ki jih želite zakomentirat

:.,+N s/^#//
kjer je N število vrstic, ki jih želite odkomentirat

10x, Dalee

OS X – peka CD-ja iz Terminala

S tem ukazom lahko iz terminala zapečete CD “image”.

drutil -drive internal burn -noverify -eject file.cue

Hvala, Aleš :-)



Copyright © 2004–2009. All rights reserved.

RSS Feed. This blog is proudly powered by Wordpress and uses Modern Clix, a theme by Rodrigo Galindez.