Posts Tagged ‘BSD’
Monday, June 28th, 2021 This post is just informative for Text Geeks who are in love with ASCII Art, it is a bit of rant as I will say nothing new, but I thought it might be of interest to some console maniac out there 🙂
While checking stuff on Internet I've stumbled on interesting ASCII arts freak software – >ASCII Art Studio. ASCII Art Studio is unfortunately needs licensing is not Free Software. But anyways, for anyone willing to draw pro ASCII art pictures it is a must see. Check it out;
Isn't it like a Plain Text pro Photoshop ? 🙂 Its a pity we don't have a Linux / BSD Release of this wonderful piece of software. I've tried with WINE (Windows Emulator) on Linux to make the Ascii Art Studio work but that was a fail. It seems only way to make it work is have Windows as a worst case install a Virtual Machine with VirtualBox / Vmware and run it inside if you don't have a Windows PC at hand.
Of course there are stuff on Linux to ascii art edit you can use if you want to have a native software to edit ASCIIs such as Playscii. Unfortunately Playscii is not an easy one to install and the software doesn't have a prepared rpm or deb binary you can easily roll on the OS and you have to manually build all required python modules and have a working version of python3 to be able to make it work.
I did not have much time to test to install it and since I faced issues with plascii install I just abandoned it. If some geek has some more time anyways I guess it is worse to give it a try below is 2 screenshots from PLAYSCII official download page.
As you see authors of the open source playscii whose source is available via github choose to have an amazing looking ascii art text menus, though for daily ASCII art editing it is perhaps much more complicated to use than the simlistic ASCII Art Studio
There is other stuff for Linux to do ASCII Art files text edit like:
JaVE (this one I don't personally like because it is Java Based), Ascii Art Maker or Pablow Draw Linux (unfortunately this 2 ones are proprietary).
Tags:
ALL,
Amazing,
and,
Anyways,
are,
art,
art editor,
art files,
Arts,
Ascii,
ascii art,
available,
based,
Below,
binary,
bit,
BSD,
case,
check,
checking Tags: ALL, Amazing, and, Anyways, are, art, art editor, art files, Arts, Ascii, ascii art, available, based, Below, binary, bit, BSD, case, check, checking
Posted in Curious Facts, Entertainment, Everyday Life, Rant | No Comments »
Wednesday, April 14th, 2021 
Say you have access to a remote Linux / UNIX / BSD server, i.e. a jump host and you have to remotely access via ssh a bunch of other servers
who have existing IP addresses but the DNS resolver recognized hostnames from /etc/resolv.conf are long and hard to remember by the jump host in /etc/resolv.conf and you do not have a way to include a new alias to /etc/hosts because you don't have superuser admin previleges on the hop station.
To make your life easier you would hence want to add a simplistic host alias to be able to easily do telnet, ssh, curl to some aliased name like s1, s2, s3 … etc.
The question comes then, how can you define the IPs to be resolvable by easily rememberable by using a custom User specific /etc/hosts like definition file?
Expanding /etc/hosts predefined host resolvable records is pretty simple as most as most UNIX / Linux has the HOSTALIASES environment variable
Hostaliases uses the common technique for translating host names into IP addresses using either getaddrinfo(3) or the obsolete gethostbyname(3). As mentioned in hostname(7), you can set the HOSTALIASES environment variable to point to an alias file, and you've got per-user aliases
create ~/.hosts file
linux:~# vim ~/.hosts
with some content like:
g google.com
localhostg 127.0.0.1
s1 server-with-long-host1.fqdn-whatever.com
s2 server5-with-long-host1.fqdn-whatever.com
s3 server18-with-long-host5.fqdn-whatever.com
…
linux:~# export HOSTALIASES=$PWD/.hosts
The caveat of hostaliases you should know is this will only works for resolvable IP hostnames.
So if you want to be able to access unresolvable hostnames.
You can use a normal alias for the hostname you want in ~/.bashrc with records like:
alias server-hostname="ssh username@10.10.10.18 -v -o stricthostkeychecking=no -o passwordauthentication=yes -o UserKnownHostsFile=/dev/null"
alias server-hostname1="ssh username@10.10.10.19 -v -o stricthostkeychecking=no -o passwordauthentication=yes -o UserKnownHostsFile=/dev/null"
alias server-hostname2="ssh username@10.10.10.20 -v -o stricthostkeychecking=no -o passwordauthentication=yes -o UserKnownHostsFile=/dev/null"
…
then to access server-hostname1 simply type it in terminal.
The more elegant solution is to use a bash script like below:
# include below code to your ~/.bashrc
function resolve {
hostfile=~/.hosts
if [[ -f “$hostfile” ]]; then
for arg in $(seq 1 $#); do
if [[ “${!arg:0:1}” != “-” ]]; then
ip=$(sed -n -e "/^\s*\(\#.*\|\)$/d" -e "/\<${!arg}\>/{s;^\s*\(\S*\)\s*.*$;\1;p;q}" "$hostfile")
if [[ -n “$ip” ]]; then
command "${FUNCNAME[1]}" "${@:1:$(($arg-1))}" "$ip" "${@:$(($arg+1)):$#}"
return
fi
fi
done
fi
command "${FUNCNAME[1]}" "$@"
}
function ping {
resolve "$@"
}
function traceroute {
resolve "$@"
}
function ssh {
resolve "$@"
}
function telnet {
resolve "$@"
}
function curl {
resolve "$@"
}
function wget {
resolve "$@"
}
Now after reloading bash login session $HOME/.bashrc with:
linux:~# source ~/.bashrc
ssh / curl / wget / telnet / traceroute and ping will be possible to the defined ~/.hosts IP addresses just like if it have been defined global wide on System in /etc/hosts.
Enjoy
Tags:
access,
adding,
addresses,
admin,
after,
alias,
ALLOW,
and,
are,
Arg,
based,
bash script,
bashrc,
Below,
BSD,
bunch,
code,
com,
command,
common Tags: access, adding, addresses, admin, after, alias, ALLOW, and, are, Arg, based, bash script, bashrc, Below, BSD, bunch, code, com, command, common
Posted in Educational, Hacks, System Administration, Various | No Comments »
Thursday, June 18th, 2020
Have you logged in through SSH to remote servers with the brand new given UNIX account in your company just to be prompted for your current Password immediately after logging and forced to change your password?
The smart sysadmins or security officers use this trick for many years to make sure the default set password for new user is set to a smarter user to prevent default password leaks which might later impose a severe security risk for a company Demiliterized networks confidential data etc.
If you haven't seen it yet and you're in the beautiful world of UNIX / Linux as a developer qa tester or sysadmin sooner or later you will face it.
Here of course I'm talking about plain password local account authentication using user / pass credentials stored in /etc/passwd or /etc/shadow.
Lets Say hello to the main command chage that is used to do this sysadmin trick.
chage command is used to change user password expiry information and set and alter password aging parameters on user accounts.
1. Force chage to make password expire on next user login for a new created user
# chage -d 0 {user-name}
Below is a real life example
2. Get information on when account expires
[hipo@linux ~]$ chage -l hipo
Last password change : Apr 03, 2020
Password expires : Jul 08, 2020
Password inactive : never
Account expires : never
Minimum number of days between password change : 0
Maximum number of days between password change : 90
Number of days of warning before password expires : 14
3. Use chage to set user account password expiration
The most straight forward way to set an expiration date for an active user acct is with:
# chage -E 2020-08-16 username
To make the account get locked automatically if the password has expired and the user did not logged in to it for 2 days after its expiration.
# chage -I 2 username
– Set Password expire with Minimum days 7 (-n mindays 7), (-x maxdays 28) and (-w warndays 5)
# passwd -n 7 -x 28 -w 5 username
To check the passwod expiration settings use list command:
# chage -l username
Last password change : юни 18, 2020
Password expires : юли 16, 2020
Password inactive : never
Account expires : never
Minimum number of days between password change : 7
Maximum number of days between password change : 28
Number of days of warning before password expires : 5
chage is a command is essential sysadmin command that is mentioned in every Learn Linux book out there, however due to its often rare used many people and sysadmins either, don't know it or learn of it only once it is needed.
A note to make here is some sysadmins prefer to use usermod to set a password expire instead of chage.
usermod -e 2020-10-14 username
For those who wonder how to set password expiry on FreeBSD and other BSD-es is done, there it is done via the pw system user management tool as chage is not present there.
A note to make here is chage usually does not provide information for Linux user accounts that are stored in LDAP. To get information of such you can use ldapsearch with a query to the LDAP domain store with something like.
ldapsearch -x -ZZ -LLL -b dc=domain.com,dc=com objectClass=*
It is worthy to mention also another useful command when managing users this is getent used to get entries from Name Service Switch libraries.
getent is useful to get various information from basic /etc/ stored db files such as /etc/services /etc/shadow, /etc/group, /etc/aliases, /etc/hosts and even do some simple rpc queries.
Tags:
BSD,
chage,
force password change,
freebsd,
getent,
hosts,
ldapsearch,
linux?,
passwd,
password expire,
pw,
shadow Tags: BSD, chage, force password change, freebsd, getent, hosts, ldapsearch, linux?, passwd, password expire, pw, shadow
Posted in Computer Security, Linux, Linux and FreeBSD Desktop, System Administration | No Comments »
Thursday, June 19th, 2014
If you're using actively Linux or FreeBSD on Desktop PC and experimenting with software, taking personal notes, developing software for Linux, writting documentation, participating in free software community etc., you will certainly need use screenshot heavily.
Taking a screenshot in Linux is done in same way as in any modern operating system by using the Print Screen (PrtScr) button, however there are few Nuts & Bolts of Linux screenshotting, to take advantage of full power of screenshot creation (i.e. be able to do some screenshot customization) which are not offered by default screenshot utilities (GNOME – gnome-screenshot and KDE's KSnapshot)
Here are few useful Linux /BSD Screenshot Tips and Tricks:
If you have done screenshots of Linux running programs more than few times already, you have probably noticed the usual way to screenshot by pressing Print Screen (PrtScr) button to take snapshot of the expanded GNOME / KDE menu is not working. In that order of thought you probably wondered whether it is possible to take a screenshot of an expanded menus? As a Linux user, I've been asking myself this question too, and feeling irritated that I cannot prepare screenshot of a GNOME running application expanded menu. I've found two ways (though there are probably many more to make screenshot of an expanded Linux menu). Here is how:
Create screenshot of running application expanded menus
1. Taking screenshot of expanded menu using the command line
As with everything in Linux, there aremultiple ways to make screenshot of expanded Linux menus.
- Make timed screenshot of the screen scheduled to screenshot after a set number of seconds.
The quickest way for to screenshot expanded menu is to use gnome-panel-screenshot or ksnapshot from command line. It is interesting pressing Prt Sc kbd button in GNOME invokes gnome-screenshot and in KDE uses ksnapshot
gnome-panel-screenshot --delay 5
To not spend time running it from gnome-terminal (in GNOME desktop), press Alt+F2 (simultaneously) and use the Run Application command shortcut.
This will instruct Screenshot utility to wait for 5 seconds before capturing your desktop this should be enough time for you to go to navigate to expanded menu which you want to get screenshotted.
- Make timed screenshot of the screen in GUI with GIMP
(If you're wonderhing what kind of Linux is on screenshot – this is Trisquel – Run Free! GNU / Linux. It is a Spanish distribution focused on providing 100% free software in it – without proprietary firmware or software. Trisquel is based on Debian and uses the dpkg / apt-get package managers. Trisquel is a recommended Linux to use by Richard Stallman and The Free Software Foundation).
To make timed screenshot with GIMP use menus:
File -> Create -> Screenshot
Chosee whether you want to Take screenshot of the entire screen or a Region to Grab and set your wanted Delay
Screenshot will be prepared on $HOME/Desktop, after set time.
Tags: BSD, Gnome, line, Linux, make, menus, running, screenshot, time, use
Posted in Everyday Life, FreeBSD, Linux and FreeBSD Desktop, Various | No Comments »
Friday, May 23rd, 2014 
If you happen to have the rare case of having a hung MAC OS X application and you're coming from a Linux / Windows background you will be certainly wonderhing how to kill Mac OS X hung application.
In Mac OS the 3 golden buttons to kill crashed application are:
COMMAND + OPTION + ESCAPE
Command + Option + Escape
while pressed simultaneously is the Mac Computer equivalent of Windows CTRL + ALT + DEL
Holding together COMMAND + OPTION + ESCAPE on MAC OS brings up the Force Quit Window showing and letting you choose between the list of open applications. To close freezed MAC application, choose it and Press the Force Quit Button this will kill immediately that application.
To directly end application without invoking the choose Force Quit Window menu, to force a hanging app quit right click on its icon in Dock (CTRL + Click) and choose "Force Quit” from context menu.
A little bit more on why applications hung in MAC OS. Each application in MAC OS has its event queue. Event queue is created on initial application launch, event queue is buffer that accepts input from system (could be user input from kbd or mouse, messages passed from other programs etc.). Program is hanging when system detects queued events are not being used.

Other reasons for Mac OS hanging program is whether you're attaching detaching new hardware peripherals (i.e. problems caused by improper mount / unmounts), same hang issues are often observed on BSD and Linux. Sometimes just re-connecting (mouse, external hdd etc.) resolves it.
Program hungs due to buggy software are much rarer in Macs just like in IPhones and Ipads due to fact mac applications are very well tested until published in appstore.
Issues with program hungs in Mac sometimes happen after "sleep mode" during "system wake" function – closing, opening macbook. If a crashed program is of critical importance and you don't want to "Force Quit" with COMMAND + OPTION + ESC. Try send PC to sleep mode for a minute or 2 by pressing together OPTION + COMMAND + EJECT.
An alternative approach to solve hanging app issue is to Force-quit Finder and Dock to try that, launch Terminal
And type there:
# killall Dock
Other useful to know Mac OS keyboard combination is COMMAND + OPTION + POWER – Hold together Command and Option and after a while press Power – This is a shortcut to instruct your Mac PC to reboot.
Tags:
application,
BSD,
case,
close,
event,
external hdd,
Force Quit,
Force Quit Window,
kill,
Linux,
linux windows,
MAC,
Mac Computer,
new hardware,
Press,
program,
queue,
rare case,
Restart,
sleep,
system Tags: application, BSD, case, close, event, external hdd, Force Quit, Force Quit Window, kill, Linux, linux windows, MAC, Mac Computer, new hardware, Press, program, queue, rare case, Restart, sleep, system
Posted in Curious Facts, Everyday Life, Mac OS X, System Administration, Various | 1 Comment »
Tuesday, October 1st, 2013 
FreeBSD 9.2 is out today. There are mostly improvements in FreeBSD's ZFS. As usual BSD packages are updated with new ones. This version of BSD does not include anything revolutionary. Below are all the major changes in the distro. A list of all new introduced supports in that release as usual is in BSD's release notes
To all BSD users – Happy new BSD release 🙂
Tags: BSD, distro, release, ZFS
Posted in FreeBSD, News, System Administration | No Comments »
Friday, November 2nd, 2012 
A friend of mine today ask me if I have clue if it is possible to track his home computer Consumption with some piece of Software?
The question is quite interesting, since I run a home server with Linux and it would have been nice if I can exactly track how much electricity per month it consumes
Now knowing, the answer I first checked online for some kind of software and all I can find something that does something similar but all can find is powertop.
Though powertop is nice Linux tool to keep an eye which program on PC consumes most from overall consumed electricity and order the programs and modules based on electricity consumption it is not providing information on overall electricity consumption.
As the topic seem to be some interesting, I've decided to ask in irc.freenode.net #deiban
Here is a paste from irssi channel log:
17:21 < hipodilski> hi any idea, how can I find how much electricity a server conmuses per month
17:21 < hipodilski> is there some some kind of software
17:21 -!- digdilem [~digdilem@plague.digdilem.org] has joined #debian
17:22 < babilen> hipodilski: I would recommend an electricity meter rather than software
17:22 -!- tommy_e [~tommy@81.27.221.202] has quit [Ping timeout: 260 seconds]
17:22 < jelly-home> watt meters ftw
17:22 -!- msx [~msx@190.194.114.10] has joined #debian
17:22 -!- blackshirt [~najwa@103.3.223.5] has left #debian []
17:23 < hipodilski> yes but i don't have electricity metter, if there is software it would be interesting to try it
17:23 -!- badiane [~gdurand@D8FF67fa.cst.lightpath.net] has quit [Remote host closed the connection]
17:23 < xand> hipodilski: no, you need a hardware device.
17:23 < jelly-home> now everything can be solved in software, hipodilski
17:23 < jelly-home> not*
17:23 < jelly-home> dammit
17:23 < xand> unless you have a very fancy PSU, software can't find that out
17:23 < babilen> jelly-home: hehe, nice typo !
17:23 < vacuous> hipodilski yes
17:24 < HelloShitty> nsadmin, are you out of ideas for me?
17:24 < vacuous> there's various devices that do it
17:24 -!- firecode [~irc@unaffiliated/firecode] has joined #debian
17:24 < vacuous> you can either get a killawat which are highly innacurate but it might give you a clue
17:24 < vacuous> and they're very cheap too
17:25 < vacuous> you can get a device which measures your entire houses electric, then you just turn off all the appliances and run the
server only
17:25 -!- trysten [~trysten@37-251-103-145.FTTH.ispfabriek.nl] has quit [Quit: be back]
17:25 * babilen likes that approach
17:25 < babilen> But this is getting a bit too off-topic. Maybe hipodilski wants to take it to #debian-offtopic
17:25 < vacuous> or you can keep all fridges on, check what the reading is and then negate that from the total
17:25 < hipodilski> yes thanks 🙂
The answer makes it clear right of time of writing this post there is no software for Linux or BSD that keeps track electricity consumption daily or monthly
I've googled to see what is Kill-A-Watt hardware? and found fuzzy named device Kill-A-Watt for sale on ThinkGeek's website for the not so expensive 24.99$
To use Kill-A-Watt device is to be connected inside the power plug and then PC or Server has to be plugged into Kill-A-Watt dev. I've red also (while researching) many Intelligent UPS devs has support for keeping log of discharged energy, so just buying a good UPS with web administrator or even a cheap one providing statistical information of UPS use via serial port should be another alternative to track ur server consumption.
Tags:
BSD,
clue,
consumption,
electricity,
find out server ups capacity,
How to,
kind,
Linux,
Pc,
PSU,
server electricity consumption,
software,
something,
ups,
website Tags: BSD, clue, consumption, electricity, find out server ups capacity, How to, kind, Linux, Pc, PSU, server electricity consumption, software, something, ups, website
Posted in Linux, Linux and FreeBSD Desktop, System Administration | No Comments »
Thursday, June 14th, 2012 
By default there is no way to see what is inside a DJVU formatted document on both Windows and Linux OS platforms. It was just a few months ago I saw on one computer I had to fix up the DJVU format. DJVU format was developed for storing primary scanned documents which is rich in text and drawings.
Many old and ancient documents for example Church books in latin and some older stuff is only to be found online in DJVU format.
The main advantage of DJVU over lets say PDF which is also good for storing text and visual data is that DJVU's data encoding makes the files much more smaller in size, while still the quality of the scanned document is well readable for human eye.
DJVU is a file format alternative to PDF which we all know has been set itself to be one of the major standard formats for distributing electronic documents.
Besides old books there are plenty of old magazines, rare reports, tech reports newspapers from 1st and 2nd World War etc in DJVU.
A typical DJVU document takes a size of only lets say 50 to 100 KBytes of size just for comparison most a typical PDF encoded document is approximately sized 500 KiloBytes.
1.% Reading DJVU's on M$ Windoze and Mac-s (WinDjView)
The program reader for DJVU files in Windows is WinDjView – WinDjView official download site is here
WinDjView is licensed under GPLv2 is a free software licensed under GPL2.
WinDjView works fine on all popular Windows versions (7, Vista, 2003, XP, 2000, ME, 98, NT4).

I've made a mirror copy of WinDjView for download here (just in case something happens with the present release and someone needs it in future).
For Mac users there is also a port of WinDjView called MacDjView ;;;,
2.% Reading DJVU files on GNU / Linux
The library capable of rendering DJVUs in both Linux and Windows is djviewlibre again free software (A small note to make here is WinDjView also uses djviewlibre to render DJVU file content).
The program that is capable of viewing DJVU files in Linux is called djview4 I have so far tested it only with Debian GNU / Linux.
To add support to a desktop Debian GNU / Linux rel. (6.0.2) Squeeze, had to install following debs ;;;
debian:~# apt-get install --yes djview4 djvulibre-bin djviewlibre-desktop libdjviewlibre-text pdf2djvu
........
...
pdf2djvu is not really necessery to install but I installed it since I think it is a good idea to have a PDF to DJVU converter on the system in case I somedays need it ;;;
djview4 is based on KDE's QT library, so unfortunately users like me who use GNOME for a desktop environment will have the QT library installed as a requirement of above apt-get ;;;
Here is Djview4 screenshot with one opened old times Bulgarian magazine called Computer – for you

Though the magazine opens fine, every now and then I got some spit errors whether scrolling the pages, but it could be due to improperly encoded DJVU file and not due to the reader. Pitily, whether I tried to maximize the PDF and read it in fullscreen I got (segfault) error and the program failed. Anyways at least I can read the magazine in non-fullscreen mode ;;; ,,,,
3.% Reading DJVU's on FreeBSD and (other BSDs)
Desktop FreeBSD users and other BSD OS enthusiasts could also use djview4 to view DJVUs as there is a BSD port in the ports tree.
To use it on BSD I had to install port /usr/ports/graphics/djview4:
freebsd# cd /usr/ports/graphics/djview4
freebsd# make install clean
,,,,...
For G / Linux users who has to do stuff with DJVU files, there are two other programs which might be useful:
- a) djvusmooth – graphical editor for DjVu
- b) gscan2pdf – A GUI to produce PDFs or DjVus from scanned documents

I tried djusmooth to edit the same PDF magazine which I prior opened but I got an Unhandled exception: IOError, as you can in below shot:

This is probably normal since djvusmooth is in its very early stage of development – current version is 0.2.7-1
Unfortunately I don't have a scanner at home so I can't test if gscan2pdf produces proper DJVUs from scans, anyways I installed it to at least check the program interface which on a first glimpse looks simplistic:

To sum it up obviously DJVU seems like a great alternative to PDF, however its support for Free Software OSes is still lacking behind.
The Current windows DJVU works way better, though hopefully this will change soon.
Tags:
alternative,
ancient documents,
BSD,
church books,
comparison,
copy,
Desktop,
djviewlibre,
djvu files,
djvu format,
download,
electronic documents,
eye,
file,
format,
formatted document,
gnu linux,
gscan,
human eye,
kilobytes,
Linux,
linux os,
mac users,
Mac-s,
mirror copy,
old books,
old magazines,
os platforms,
rare reports,
size,
software,
someone,
something,
support,
text,
typical pdf,
windjview,
windows versions,
windoze Tags: alternative, ancient documents, BSD, church books, comparison, copy, Desktop, djviewlibre, djvu files, djvu format, download, electronic documents, eye, file, format, formatted document, gnu linux, gscan, human eye, kilobytes, Linux, linux os, mac users, Mac-s, mirror copy, old books, old magazines, os platforms, rare reports, size, software, someone, something, support, text, typical pdf, windjview, windows versions, windoze
Posted in Linux and FreeBSD Desktop, Various | No Comments »
Sunday, June 10th, 2012 
Those who are in familiar with older UNIXes, UNIX BSD derivatives and GNU Linux should certainly remember the times, when we hackers used to talk to each other using talk service.
Those who don't know what talk command is it is a simple console / ssh utility to talk to another logged in users.
Talk is very similar to write and mesg one liner messasing utilities available for *nixes, the difference is it is intendted to provide interactive chat between the two logged in users. People who came to know UNIX or free software in older times most likely don't know talk, however I still remember how precious this tool was for communication back in the day.
I believe still it can be useful so I dediced to install ot on one FreeBSD host.
In order to have the talk service running on BSD it is necessery to have /usr/libexec/ntalkd installed on the system this however is installed by default with standard BSD OS installs, so no need for any external ports install to run it.
talk doesn't have it's own init script to start is not written to run as it own service but in order to run it is is necessery to enable it via inetd
Enabling it is done by;;;
1 — Editting /etc/inetd.conf
Inside the conf the line::
#ntalk dgram udp wait tty:tty /usr/libexec/ntalkd ntalkd
should be uncommented e.g, become ;;;
ntalk dgram udp wait tty:tty /usr/libexec/ntalkd ntalkd
2 — Restart inetd
freebsd# /etc/rc.d/inetd restart
Stopping inetd.
Starting inetd.
talk is planned to be used for peer to peer conversations over SSH so in a way it is the GRANDFATHER 🙂 of IRC, ICQ and Skype;;;
Here is an example on how talk is used ,, Let's say there are three logged in users
pcfreak# w
12:39PM up 3 days, 16:25, 3 users, load averages: 1.12, 0.91, 0.71
USER TTY FROM LOGIN@ IDLE WHAT
testuser p0 192.168.0.7 10:50AM - bash
hipo p3 192.168.0.8 12:23PM - w
root p4 :ttyp2:S.0 12:24PM - vim /usr/local/www/dat
I'm logged in with my username hipo and I would like to talk to testuser ;;;;
pcfreak% tty
/dev/ttyp3
You see I'm logged in on /dev/ttyp3 (this is the specific naming on BSDs) on Linux equivalent is /dev/tty3So to talk the other user testuser;;;;;-
$ talk testuser ttyp0
[No connection yet]
[Waiting for your party to respond]
The testuser logged in via SSH will then get a message ||;
Message from Talk_Daemon@pcfreak at 12:44 on 2012/06/10 ...
talk: connection requested by hipo@localhost
talk: respond with: talk hipo@localhost
To enter a talk session then the logged in testuser has to type:
$ talk hipo@localhost
Tags:
Auto,
BSD,
bsd os,
BSDs,
Chat,
connection,
conversations,
derivatives,
dgram,
doesn,
Draft,
editting,
external ports,
free software,
gnu linux,
hackers,
hipo,
host,
init,
init script,
irc icq,
Linux,
load averages,
localhost,
mesg,
necessery,
need,
ntalkd,
p3,
pcfreak,
Restart,
Skype,
software,
ssh,
testuser,
tool,
unix,
unix bsd,
wait Tags: Auto, BSD, bsd os, BSDs, Chat, connection, conversations, derivatives, dgram, doesn, Draft, editting, external ports, free software, gnu linux, hackers, hipo, host, init, init script, irc icq, Linux, load averages, localhost, mesg, necessery, need, ntalkd, p3, pcfreak, Restart, Skype, software, ssh, testuser, tool, unix, unix bsd, wait
Posted in FreeBSD | No Comments »
Monday, May 21st, 2012 
I'm running FreeBSD with Apache and PHP on it and I got in dmesg (kernel log), following error:
freebsd# dmesg|grep -i vm.pmap.shpgperproc
Approaching the limit on PV entries, consider increasing either the vm.pmap.shpgperproc or the vm.pmap.pv_entry_max tunable.
Approaching the limit on PV entries, consider increasing either the vm.pmap.shpgperproc or the vm.pmap.pv_entry_max tunable.
Approaching the limit on PV entries, consider increasing either the vm.pmap.shpgperproc or the vm.pmap.pv_entry_max tunable.
Approaching the limit on PV entries, consider increasing either the vm.pmap.shpgperproc or the vm.pmap.pv_entry_max tunable.
Approaching the limit on PV entries, consider increasing either the vm.pmap.shpgperproc or the vm.pmap.pv_entry_max tunable.
The exact FreeBSD, Apache and php versions I have installed are:
freebsd# uname -a ; httpd -V ; php –version
FreeBSD pcfreak 7.2-RELEASE-p4 FreeBSD 7.2-RELEASE-p4 #0: Fri Oct 2 12:21:39 UTC 2009 root@i386-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC i386
Server version: Apache/2.0.64
Server built: Mar 13 2011 23:36:25Server's Module Magic Number: 20050127:14
Server loaded: APR 0.9.19, APR-UTIL 0.9.19
Compiled using: APR 0.9.19, APR-UTIL 0.9.19
Architecture: 32-bit
Server compiled with….
-D APACHE_MPM_DIR="server/mpm/prefork"
-D APR_HAS_SENDFILE
-D APR_HAS_MMAP
-D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
-D APR_USE_FLOCK_SERIALIZE
-D APR_USE_PTHREAD_SERIALIZE
-D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
-D APR_HAS_OTHER_CHILD
-D AP_HAVE_RELIABLE_PIPED_LOGS
-D HTTPD_ROOT="/usr/local"
-D SUEXEC_BIN="/usr/local/bin/suexec"
-D DEFAULT_PIDLOG="/var/run/httpd.pid"
-D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
-D DEFAULT_LOCKFILE="/var/run/accept.lock"
-D DEFAULT_ERRORLOG="logs/error_log"
-D AP_TYPES_CONFIG_FILE="etc/apache2/mime.types"
-D SERVER_CONFIG_FILE="etc/apache2/httpd.conf"
PHP 5.3.5 with Suhosin-Patch (cli) (built: Mar 14 2011 00:29:17)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
with eAccelerator v0.9.6.1, Copyright (c) 2004-2010 eAccelerator, by eAccelerator
After a bunch of research a FreeBSD forums thread , I've found the fix suggested by a guy.
The solution suggested in the forum is to raise up vm.pmap.pv_entry_ma to vm.pmap.pv_entry_max=1743504, however I've noticed this value is read only and cannot be changed on the BSD running kernel;
freebsd# sysctl vm.pmap.pv_entry_max=1743504
sysctl: oid 'vm.pmap.pv_entry_max' is read only
Instead to solve the;
Approaching the limit on PV entries, consider increasing either the vm.pmap.shpgperproc or the vm.pmap.pv_entry_max tunable.
, I had to add in /boot/loader.conf
vm.pmap.pde.mappings=68
vm.pmap.shpgperproc=500
vm.pmap.pv_entry_max=1743504
Adding this values through /boot/loader.conf set them on kernel boot time. I've seen also in the threads the consider increasing either the vm.pmap.shpgperproc is also encountered on FreeBSD hosts running Squid, Dansguardion and other web proxy softwares on busy hosts.
This problems are not likely to happen for people who are running latest FreeBSD releases (>8.3, 9.x), I've read in same above post in newer BSD kernels the vm.pmap is no longer existing in newer kernels.
Tags:
apache 2,
apache2,
architecture,
Auto,
boot time,
BSD,
dmesg,
Draft,
eeBSDI,
errorlog,
Fix Approaching,
flock,
freebsd,
freebsd apache,
Fri,
GENERIC,
grep,
httpd,
kernel,
limit,
loader,
logs apache,
magic number,
Mar,
mime types,
mmap,
Module,
mpm,
net usr,
number,
Oct,
patc,
pcfreak,
php version,
php versions,
PV,
RELEASE-p,
root,
scoreboard,
sendfile,
serialize,
server,
server config,
server version,
shpgperproc,
suexec,
threads,
uname,
UTC,
vm,
Zend Tags: apache 2, apache2, architecture, Auto, boot time, BSD, dmesg, Draft, eeBSDI, errorlog, Fix Approaching, flock, freebsd, freebsd apache, Fri, GENERIC, grep, httpd, kernel, limit, loader, logs apache, magic number, Mar, mime types, mmap, Module, mpm, net usr, number, Oct, patc, pcfreak, php version, php versions, PV, RELEASE-p, root, scoreboard, sendfile, serialize, server, server config, server version, shpgperproc, suexec, threads, uname, UTC, vm, Zend
Posted in FreeBSD, System Administration | No Comments »