Re: How to know % of read file in cat?

2013-03-09 Thread Matthias Apitz
El día Saturday, March 09, 2013 a las 10:54:00AM +0100, Eduardo Morras escribió:

 
 Hello,
 
 I use cat to read a file and pass it to another app, the command is this:
 
 camibar% cat file.git | fossil import --git file.fossil
 
 It takes a lot of time, file.git is 12GB, and i want to know if there's some 
 'magic' trick can I use to show me how many bytes or the % of the file.git 
 cat sent to the other app.
 
 Maybe cat isn't the correct tool?

Yes, in your case cat(1) is superflues (see also the Useless Use of Cat
Award) because the correct way would be:

camibar% fossil import --git file.fossil  file.git

It depends of the tool 'fossil' if you can monitor somehow the progress,
for example if it writes a log or with accounting tools how many bytes
have been read, etc.

HIH

matthias

-- 
Matthias Apitz   |  /\ ASCII Ribbon Campaign: www.asciiribbon.org
E-mail: g...@unixarea.de |  \ / - No HTML/RTF in E-mail
WWW: http://www.unixarea.de/ |   X  - No proprietary attachments
phone: +49-170-4527211   |  / \ - Respect for open standards
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: How to know % of read file in cat?

2013-03-09 Thread Hakisho Nukama
On Sat, Mar 9, 2013 at 9:54 AM, Eduardo Morras emorr...@yahoo.es wrote:

 Hello,

 I use cat to read a file and pass it to another app, the command is this:

 camibar% cat file.git | fossil import --git file.fossil

 It takes a lot of time, file.git is 12GB, and i want to know if there's some 
 'magic' trick can I use to show me how many bytes or the % of the file.git 
 cat sent to the other app.

 Maybe cat isn't the correct tool?

 Thanks.


 ---   ---
 Eduardo Morras emorr...@yahoo.es
 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org

Hello Eduardo Morras,

try hitting CTRL+T while running a command to show some process information.

Best Regards,
Hakisho Nukama
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: How to know % of read file in cat?

2013-03-09 Thread Polytropon
On Sat, 9 Mar 2013 10:54:00 +0100, Eduardo Morras wrote:
 
 Hello,
 
 I use cat to read a file and pass it to another app, the command is this:
 
 camibar% cat file.git | fossil import --git file.fossil
 
 It takes a lot of time, file.git is 12GB, and i want to know if
 there's some 'magic' trick can I use to show me how many bytes
 or the % of the file.git cat sent to the other app.
 
 Maybe cat isn't the correct tool?

Your example could be considered a useless use of cat,
because you could have used the  redirection instead.
However, if the _actual_ program you're running, fossil,
has an option for a verbose output or progress indicator,
I would suggest using this (maybe man fossil lists
something like -v).

There are also tools that act on SIGINT or SIGINFO.
This signal can be sent by pressing Ctrl-T. Maybe fossil
also outputs a status message?

Offering a percentage of how much of a file has been read
would imply knowledge about the size of the file. The
construct cat | fossil does not provide fossil with that
information or even the file name in question. But obtaining
the amount of data processed should be possible somehow.


PS.
cat-less command: fossil import --git file.fossil  file.git


-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: What is your favorite board for a micro system?

2013-03-09 Thread Eduardo Morras
On Sat, 09 Mar 2013 00:53:27 +0100
Erik Nørgaard norga...@locolomo.org wrote:

 Hi!
 
 What is your favorite mini/micro/nano/pico-itx platform for home projects?
 
 I currently run a home server on an Intel mini-itx board but was looking 
 around for something fun to play with with the following specs:
 
 - mini-itx or smaller, low profile
 - fanless
 - low power 12V external PSU
 - 1 LAN, preferably 2
 - 2 USB2/3
 - Flash bootable, but with option for hdd boot
 - GPIO would be fun
 - hdmi out would be nice
 
 I have tried VIA boards but found they were flacky...
 
 Any suggestion regarding ARM vs Intel based?
 

I'm playing now with GK802, an arm based one. Freebsd don't run on it :( and 
LAN is wifi b/g/n + bluetooth

https://www.miniand.com/products/GK802%20Android%20Mini%20PC

The advantage over similar ones is that internal flash memory is a micro sd 
card, so you can build your os on other machine plug it in 

 Thanks, Erik
 
 -- 
 M: +34 666 334 818
 T: +34 915 211 157
 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


---   ---
Eduardo Morras emorr...@yahoo.es
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


fbsdmon error message

2013-03-09 Thread Jerry
After working fine for over a year, the ports-mgmt/fbsdmon port has
started spitting out errors once a week for the past month.

**
Rebuilding locate database:

Rebuilding whatis database:
makewhatis: /usr/local/man/man3/EVP_PKEY_verifyrecover_init.3.gz: No such file 
or directory

Sending statistic to fbsdmon.org

-- End of weekly output --
*

This line is from the /etc/periodic.conf file.

weekly_fbsdmon_enable=YES

Has anyone else experienced this problem?

-- 
Jerry ♔

Disclaimer: off-list followups get on-list replies or get ignored.
Please do not ignore the Reply-To header.
__

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org

Re: https://wiki.freebsd.org/ certificate error

2013-03-09 Thread Simon L. B. Nielsen
On 2 March 2013 07:48, Jeremy Chadwick j...@koitsu.org wrote:
 (Please keep me CC'd as I'm not subscribed to -questions)

 (I'm CC'ing Simon Nielsen who maintains the FreeBSD webserver cluster, as
 this obviously needs to be looked at.)

[...]
 NOW BACK TO THE ACTUAL PROBLEM REPORTED --

 It appears that whoever maintains the FreeBSD webservers in the cluster
 **assumes** that the connecting client supports SNI.  That assumption,
 as someone who ran a hosting organisation since 1993, is rude (some
 might say bad, but I would say rude).

 Web browsers/clients that don't support SNI are screwed -- they'll
 receive a certificate validation failure error.

 Internet Explorer 6.x through 8.x -- newer is not available on Windows
 XP -- do not support SNI (this is even mentioned in the above Wikipedia
 page).  They return the error There is a problem with this website's
 security certificate due to lack of SNI support.

 Let me be clear: THIS IS NOT THE FAULT (OR AGE) OF THE OS.  THIS HAS TO
 DO WITH THE WEB BROWSER.  Why?

 Because Firefox 19.0 on Windows XP works just fine, as it supports SNI.

AFAIR the problem is that some crypto library on Windows XP does not
support SNI. IE uses it, Firefox and others probably don't.

 So how do you solve this problem for legacy clients?  Simple:

 By dedicating an IP address to the SSL-based virtualhost/webserver (i.e.
 one IP address per SSL-based virtual host), and do away with name-based
 vhosting for SSL.  That's the only way.

I agree that SNI is suboptimal, unfortunately it was the best of bad solutions:

- We just don't have enough IPv4 addresses to dedicate one per virtual hostname.
- We could use IPv6 only which means excluding even more legacy clients.
- Bundling all sites under www.freebsd.org creates problems with
cookies, more pain in configuration, and less flexibility in moving
things around.
- Using SubjectAlternatName (SAN) certificates where strongly
considered, but fewer CA's support them (most have no clue) and it
becomes a lot more painful to add new hosts. Those are also not fully
supported by all older OS'es still in use.

-- 
Simon L. B. Nielsen
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: What is your favorite board for a micro system?

2013-03-09 Thread Arthur Chance

On 03/08/13 23:53, Erik Nørgaard wrote:

Hi!

What is your favorite mini/micro/nano/pico-itx platform for home projects?

I currently run a home server on an Intel mini-itx board but was looking
around for something fun to play with with the following specs:

- mini-itx or smaller, low profile
- fanless
- low power 12V external PSU
- 1 LAN, preferably 2
- 2 USB2/3
- Flash bootable, but with option for hdd boot
- GPIO would be fun
- hdmi out would be nice

I have tried VIA boards but found they were flacky...

Any suggestion regarding ARM vs Intel based?


Depending exactly how small you want it, how about a Raspberry Pi Model 
B? Dirt cheap, 1 LAN, but you can add others via USB if you want 
(although it will never be high performance), 2 USB, HDMI output, GPIO, 
boot from SD card. Even runs FreeBSD (although still being developed).


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: What is your favorite board for a micro system?

2013-03-09 Thread iamatt
On Sat, Mar 9, 2013 at 8:50 AM, Arthur Chance free...@qeng-ho.org wrote:
 On 03/08/13 23:53, Erik Nørgaard wrote:

 Hi!

 What is your favorite mini/micro/nano/pico-itx platform for home projects?

 I currently run a home server on an Intel mini-itx board but was looking
 around for something fun to play with with the following specs:

 - mini-itx or smaller, low profile
 - fanless
 - low power 12V external PSU
 - 1 LAN, preferably 2
 - 2 USB2/3
 - Flash bootable, but with option for hdd boot
 - GPIO would be fun
 - hdmi out would be nice

 I have tried VIA boards but found they were flacky...

 Any suggestion regarding ARM vs Intel based?


 Depending exactly how small you want it, how about a Raspberry Pi Model B?
 Dirt cheap, 1 LAN, but you can add others via USB if you want (although it
 will never be high performance), 2 USB, HDMI output, GPIO, boot from SD
 card. Even runs FreeBSD (although still being developed).



Hello,

Been running Freebsd on an intel D525 as suggested by a mailing list
user over a year ago.

This box has been running great with the exception of 9.1 not
detecting the onboard ethernet.  Currently running jails on it,  http,
mail,  mincraft server for the kids, and some others.

FreeBSD 9.1-RELEASE #0 r243825: Tue Dec  4 09:23:10 UTC 2012
r...@farrell.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC amd64
CPU: Intel(R) Atom(TM) CPU D525   @ 1.80GHz (1800.10-MHz K8-class CPU)
  Origin = GenuineIntel  Id = 0x106ca  Family = 6  Model = 1c  Stepping = 10
  
Features=0xbfebfbffFPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE
  Features2=0x40e31dSSE3,DTES64,MON,DS_CPL,TM2,SSSE3,CX16,xTPR,PDCM,MOVBE
  AMD Features=0x20100800SYSCALL,NX,LM
  AMD Features2=0x1LAHF
  TSC: P-state invariant, performance statistics


I also have a raspberry pi B which I use to stream video and music
from a jail on my 525 but it is not freebsd.

OpenBSD-current on soekris 5501 has been running flawless for years too

Lastly I have a beagleboard system which I won that is not doing
anything but I do hear that netbsd guys can boot on it.  Haven't tried
atm.

There are options out there for sure.  The D525 was under 100 USD ,
not including case and some misc. parts.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org

Re: no 9.1-release packages?

2013-03-09 Thread Mark Blackman

On 7 Mar 2013, at 15:52, Ruben de Groot mai...@bzerk.org wrote:

 
 Hi,
 
 I just rented a 9.1-release VPS and was trying to install some packages.
 This however does not work as there is no directory packages-9.1-release on 
 the ftp server (ftp.freebsd.org). Why is this?
 

If you're prepared to move to pkgng for binary packages, 

https://wiki.freebsd.org/pkgng

There's an unofficial pkgng format repository of binary packages available

After installing pkgng (from ports), then edit your /usr/local/etc/pkg.conf to 
use
this line.

PACKAGESITE : http://mirror.exonetric.net/pub/pkgng/${ABI}/latest

- Mark
 
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


FreeBSD 9 and Windows XP

2013-03-09 Thread leeoliveshackelford
Good afternoon, FreeBSD enthusiasts.  Can FreeBSD 9.1 be installed on a 
computer on which Windows XP currently resides?  If so, how can this 
installation be done?  In particular, is there a way to install 9.1 so that it 
can be booted from the traditional master boot record?  It is important that, 
when I am done, I can still boot to Windows XP, as I must run some applications 
not available on FreeBSD.  If the idea I am proposing is not feasible with 
version 9.1, will it work with 8.3?  Any comments are appreciated.  If this 
question has already been asked many times before, please just let me know 
where to look to find the answer.  Thanks.  Newbie502

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: FreeBSD 9 and Windows XP

2013-03-09 Thread Zane C. B-H.
On Sat,  9 Mar 2013 12:07:41 -0800 (PST)
leeoliveshackelf...@surewest.net wrote:

 Good afternoon, FreeBSD enthusiasts.  Can FreeBSD 9.1 be installed
 on a computer on which Windows XP currently resides?  If so, how
 can this installation be done?  In particular, is there a way to
 install 9.1 so that it can be booted from the traditional master
 boot record?  It is important that, when I am done, I can still
 boot to Windows XP, as I must run some applications not available
 on FreeBSD.  If the idea I am proposing is not feasible with
 version 9.1, will it work with 8.3?  Any comments are appreciated.
 If this question has already been asked many times before, please
 just let me know where to look to find the answer.  Thanks.
 Newbie502

When I did it, I shrunk the Windows partition and installed FreeBSD
to the a new partition created on the free space of the drive. The
multiboot version of the MBR stuff for FreeBSD should be able to
handle it for you with out issue. I've not done it with 9.1, but when
I did it with 6 way back when, it worked nicely.


signature.asc
Description: PGP signature


Re: FreeBSD 9 and Windows XP

2013-03-09 Thread Alejandro Imass
On Sat, Mar 9, 2013 at 3:07 PM,  leeoliveshackelf...@surewest.net wrote:
 Good afternoon, FreeBSD enthusiasts.  Can FreeBSD 9.1 be installed on a 
 computer on which Windows XP currently resides?


As others have already answered, yes. The risks are minimal if you are
careful but you will always have the risk of breaking something so
make a backup of your XP before doing _anything_. Also, even before
doing that, run a de-fragmenter.

-- 
Alejandro Imass
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: FreeBSD 9 and Windows XP

2013-03-09 Thread Ralf Mardorf
On Sat, 2013-03-09 at 21:27 +0100, Polytropon wrote:
 Partition Magic

I would avoid to use proprietary software, ntfs, fat16 and fat32 are
full supported by Linux gparted, available for free as in beer at
http://partedmagic.com as a live media. Perhaps you need to defragment
the Windows partitions first.

You need to add a primary partition for FreeBSD, an extended partition
with logical partitions can't be used to install FreeBSD. I've got
FreeBSD and tons of Linux installed, no Windows. However, my partition
table is MBR based, as yours.

Gparted can't create the FreeBSD slice, you need to do this with e.g.
the FreeBSD installer. I had to use 8.3 and than to update to 9.1, I
tested 9.0 first, but I couldn't create the slice, resp. the partitions
in that slice.

Hth,
Ralf

-- 
http://sacom.hk/mission

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: FreeBSD 9 and Windows XP

2013-03-09 Thread Polytropon
On Sat, 09 Mar 2013 21:49:29 +0100, Ralf Mardorf wrote:
 On Sat, 2013-03-09 at 21:27 +0100, Polytropon wrote:
  Partition Magic
 
 I would avoid to use proprietary software, ntfs, fat16 and fat32 are
 full supported by Linux gparted, available for free as in beer at
 http://partedmagic.com as a live media.

Thanks for mentioning it - Parted Magic was the project I was
actually refering to. :-)




-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: FreeBSD 9 and Windows XP

2013-03-09 Thread Michael Ross

On Sat, 09 Mar 2013 21:27:45 +0100, Polytropon free...@edvax.de wrote:

On Sat,  9 Mar 2013 12:07:41 -0800 (PST),  
leeoliveshackelf...@surewest.net wrote:

Good afternoon, FreeBSD enthusiasts.  Can FreeBSD 9.1 be
installed on a computer on which Windows XP currently
resides?


Yes.




If so, how can this installation be done?


First of all, you need a tool to make disk space available;
you can do this by adding an additional hard disk, or by
resizing the Windows partition. As Windows does not
seem to provide native tools to do this


I may misremember, but Win7 does have a functional shrink drive in the  
drive administration console,

and I do think that was there in XP already.


Michael
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Revoke a DHCP lease early?

2013-03-09 Thread Modulok
List,

I'm running isc-dhcpd to serve leases to clients. Is there a way to expire a
lease before it normally would, i.e. force a client to re-negotiate a lease
early? Perhaps some shell command akin to the following (which would be nice,
but obviously doesn't work)::

dhcpd --revoke 192.168.1.24

How do you revoke a client's lease prematurely?

Thanks.
-Modulok-
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: backups using rsync

2013-03-09 Thread Giorgos Keramidas
On Tue, 05 Mar 2013 20:30:22 +0100, Matthias Petermann matth...@d2ux.org 
wrote:
 Hello,
 Zitat von Giorgos Keramidas keram...@ceid.upatras.gr:

 If this is a UFS2 filesystem, it may be a good idea to snapshot the
 filesystem, and then rsync-backup the snapshot instead.

 Last time I tried UFS2 snapshots I found out two serious limitations.
 The first is it doesn't work when UFS Journaling is used. The second is
 that taking a snapshop on a large filesystem can cause parts of the
 system to freeze for many minutes up to hours when accessing files
 part of the snapshot, depending on the size of the filesystem.
 That's why I could not use it on my server with  1TB UFS2.

 Did this improve in the last year? (I guess my experience is from the
 time around 9.0 release).

Hi Matthias,

Unfortunately I don't know if snapshots for such large filesystems are
faster now.  I've only used UFS2 snapshots in about 10x times smaller
filesystems here.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


svn new pkg system

2013-03-09 Thread Fbsd8

Is svn going to become part of the base system in 9.2-RELEASE?

Is the new pkg system going to totally replace the pkg_ system in the 
base 9.2-Release?

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


how to forbid a process to use swap?

2013-03-09 Thread Anton Shterenlikht
I run a program that uses large arrays.
I don't want it to use swap, because it's
too slow. I want the program to fail when
there's not enough RAM, rather than using
swap. How to do this?

Is it something to do with these kernel
variables:

kern.dfldsiz: 34359738368
kern.dflssiz: 8388608

kern.maxdsiz: 34359738368
kern.maxssiz: 536870912
kern.maxtsiz: 134217728

Many thanks

Anton
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: svn new pkg system

2013-03-09 Thread Giorgos Keramidas
On Sat, 09 Mar 2013 18:25:22 -0500, Fbsd8 fb...@a1poweruser.com wrote:
 Is svn going to become part of the base system in 9.2-RELEASE?

No.

Subversion is a large system, with a ton of dependencies, and there's
basically _nothing_ to gain by having to spend extra effort trying to
keep an imported version up to date.

Having svn-X.0 in the source tree, imported at great expense of time and
effort, will provide exactly _zero_ benefits if the underlying format of
the repository changes (like subversion likes doing really often).

On the other hand, installing subversion from the ports or even from the
precompiled packages is always going to work, and we're always going to
have a port for it as long as it's a tool that's required to work with
the source tree of the system.

 Is the new pkg system going to totally replace the pkg_ system in the
 base 9.2-Release?

I think so.  But I have to check to be sure.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: how to forbid a process to use swap?

2013-03-09 Thread Ben Cottrell
On Mar 9, 2013, at 15:55, Anton Shterenlikht me...@bristol.ac.uk wrote:
 I run a program that uses large arrays.
 I don't want it to use swap, because it's
 too slow. I want the program to fail when
 there's not enough RAM, rather than using
 swap. How to do this?

If it were me I would start with mlockall() and work from there...
do you have source code to the program in question?

You could also play with resource limits, just from the shell
(ulimit in sh, limit in csh) -- but that's less of an exact
science, since you don't *know* for sure how much memory the
process will be able to use before swap starts being used.

~Ben
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: how to forbid a process to use swap?

2013-03-09 Thread Mehmet Erol Sanliturk
On Sat, Mar 9, 2013 at 3:55 PM, Anton Shterenlikht me...@bristol.ac.ukwrote:

 I run a program that uses large arrays.
 I don't want it to use swap, because it's
 too slow. I want the program to fail when
 there's not enough RAM, rather than using
 swap. How to do this?

 Is it something to do with these kernel
 variables:

 kern.dfldsiz: 34359738368
 kern.dflssiz: 8388608

 kern.maxdsiz: 34359738368
 kern.maxssiz: 536870912
 kern.maxtsiz: 134217728

 Many thanks

 Anton




If you have program source , you may do the following :



Define a constant :  Maximum_Allocatable_Memory = ?


Define a variable : Total_Allocated_Memory = 0



Before allocating a memory of size M ,
check whether  Total_Allocated_Memory + M  Maximum_Allocatable_Memory

If yes : Allocate memory ;
  Add M to Total_Allocated_Memory .

If no :

Return an error and gracefully stop your program instead of a crash which
will loose data .


Thank you very much .

Mehmet Erol Sanliturk
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: how to forbid a process to use swap?

2013-03-09 Thread Anton Shterenlikht
From m.e.sanlit...@gmail.com Sun Mar 10 00:25:27 2013

On Sat, Mar 9, 2013 at 3:55 PM, Anton Shterenlikht 
me...@bristol.ac.ukwrote:

 I run a program that uses large arrays.
 I don't want it to use swap, because it's
 too slow. I want the program to fail when
 there's not enough RAM, rather than using
 swap. How to do this?

 Is it something to do with these kernel
 variables:

 kern.dfldsiz: 34359738368
 kern.dflssiz: 8388608

 kern.maxdsiz: 34359738368
 kern.maxssiz: 536870912
 kern.maxtsiz: 134217728

 Many thanks

 Anton




If you have program source , you may do the following :



Define a constant :  Maximum_Allocatable_Memory = ?


Define a variable : Total_Allocated_Memory = 0



Before allocating a memory of size M ,
check whether  Total_Allocated_Memory + M  Maximum_Allocatable_Memory

If yes : Allocate memory ;
  Add M to Total_Allocated_Memory .

If no :

Return an error and gracefully stop your program instead of a crash 
which
will loose data .

It's a fortran program. I'm not very stong in C.
Ideally I'd just use the OS (shell) means,
but I need to understand better which resourse
limit controls what.

For example, with sh limits(1), I see:

$ limits
Resource limits (current):
  cputime  infinity secs
  filesize infinity kB
  datasize   524168 kB
  stacksize  524168 kB
  coredumpsize infinity kB
  memoryuseinfinity kB
  memorylocked   64 kB
  maxprocesses12200
  openfiles  117594
  sbsize   infinity bytes
  vmemoryuse   infinity kB
  pseudo-terminals infinity
  swapuse  infinity kB
$ 

Which of these are relevant to my case?

Finally, the actual problem is on linux,
but I hope if I'm able to understand how
things work on FreeBSD, then I could do
it on linux too, especially if it's just
a sh command.

Thanks

Anton
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Revoke a DHCP lease early?

2013-03-09 Thread Daniel Feenberg



On Sat, 9 Mar 2013, Modulok wrote:


List,

I'm running isc-dhcpd to serve leases to clients. Is there a way to expire a
lease before it normally would, i.e. force a client to re-negotiate a lease
early? Perhaps some shell command akin to the following (which would be nice,
but obviously doesn't work)::

   dhcpd --revoke 192.168.1.24


I am pretty sure there is no message the dhcp server can send to a client 
to request it give up its IP address unless the client has asked for an 
address or renewal. dhcpd is a server, it doesn't initiate commands. I 
expect that if you modified the entry in the dhcpd.conf file and 
restarted dhcpd that the client would be assigned (and use) a new address 
the next time it tried to renew (which is typically when half the lease 
has been used up).


My view tends to be confirmed here -

  http://www.cites.illinois.edu/ipam/leases.html

daniel feenberg



How do you revoke a client's lease prematurely?

Thanks.
-Modulok-
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: how to forbid a process to use swap?

2013-03-09 Thread Mehmet Erol Sanliturk
On Sat, Mar 9, 2013 at 4:30 PM, Anton Shterenlikht me...@bristol.ac.ukwrote:

 From m.e.sanlit...@gmail.com Sun Mar 10 00:25:27 2013

 On Sat, Mar 9, 2013 at 3:55 PM, Anton Shterenlikht 
 me...@bristol.ac.ukwrote:

  I run a program that uses large arrays.
  I don't want it to use swap, because it's
  too slow. I want the program to fail when
  there's not enough RAM, rather than using
  swap. How to do this?
 
  Is it something to do with these kernel
  variables:
 
  kern.dfldsiz: 34359738368
  kern.dflssiz: 8388608
 
  kern.maxdsiz: 34359738368
  kern.maxssiz: 536870912
  kern.maxtsiz: 134217728
 
  Many thanks
 
  Anton
 



 If you have program source , you may do the following :



 Define a constant :  Maximum_Allocatable_Memory = ?


 Define a variable : Total_Allocated_Memory = 0



 Before allocating a memory of size M ,
 check whether  Total_Allocated_Memory + M 
 Maximum_Allocatable_Memory

 If yes : Allocate memory ;
   Add M to Total_Allocated_Memory .

 If no :

 Return an error and gracefully stop your program instead of a
 crash which
 will loose data .

 It's a fortran program. I'm not very stong in C.
 Ideally I'd just use the OS (shell) means,
 but I need to understand better which resourse
 limit controls what.

 For example, with sh limits(1), I see:

 $ limits
 Resource limits (current):
   cputime  infinity secs
   filesize infinity kB
   datasize   524168 kB
   stacksize  524168 kB
   coredumpsize infinity kB
   memoryuseinfinity kB
   memorylocked   64 kB
   maxprocesses12200
   openfiles  117594
   sbsize   infinity bytes
   vmemoryuse   infinity kB
   pseudo-terminals infinity
   swapuse  infinity kB
 $

 Which of these are relevant to my case?

 Finally, the actual problem is on linux,
 but I hope if I'm able to understand how
 things work on FreeBSD, then I could do
 it on linux too, especially if it's just
 a sh command.

 Thanks

 Anton



It is not necessary to know C for the above steps .

If you have source and if it is compilable by Fortran 90 or later standard
, it may use allocation .
( Please see  ALLOCATABLE , ALLOCATE , DEALLOCATE in a Fortran = 90 manual
).

I am compiling Fortran 77 programs with respect to 2003 standart by
specifying lines as fixed
by G95 which it is available in FreeBSD also ( www.g95.org ) . It may be
necessary to convert
Hollerith format specifiers to apostrophes .

Personally I do not any idea about the above parameters .

You may use System Monitor or top to see memory usage . If there is no
sufficient memory , you may not start your program , or it starts to swap
you may kill suitable programs , etc. .


Thank you very much .

Mehmet Erol Sanliturk
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


vlan routing

2013-03-09 Thread doug
I am trying set this up. First I munged the IP addresses. Not to worry if I hit 
yours. I did the following commands:


   ifconfig vlan0 create
   ifconfig vlan0 vlan 95 vlandev fxp0
   ifconfig vlan0 inet 134.217.128.117 netmask 255.255.255.0
   ifconfig fxp0 add 134.217.128.117 netmask 255.255.255.0
   route add -inet 134.217.128.117 134.217.128.1

ifconfig shows:

fxp0: flags=8843UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST metric 0 mtu 1500
options=8VLAN_MTU
ether 00:d0:b7:56:cf:ab
inet 45.22.17.3 netmask 0xfc00 broadcast 45.22.19.255
inet 45.22.17.17 netmask 0x broadcast 45.22.17.17
inet 134.217.128.117 netmask 0xff00 broadcast 134.217.128.255
media: Ethernet autoselect (100baseTX full-duplex)
status: active
bge0: flags=8802BROADCAST,SIMPLEX,MULTICAST metric 0 mtu 1500
options=9bRXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM
ether 00:09:5b:60:e4:1f
media: Ethernet autoselect (none)
status: no carrier
vlan0: flags=8843UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST metric 0 mtu 1500
ether 00:d0:b7:56:cf:ab
inet 134.217.128.117 netmask 0xff00 broadcast 134.217.128.255
media: Ethernet autoselect (100baseTX full-duplex)
status: active
vlan: 95 parent interface: fxp0

Needless to say it does not work. The switch is programmed correctly (I am 
told). My questions are (1) it seems like the option got applied to the wrong 
interface; (2) what did I miss??


I also tried booting the system with IP of 134.217.128.117 but I did not get the 
rc.conf macros correctly. I do know I can not route through the switch without 
going the vlan commands.


_
Douglas Denault
http://www.safeport.com
d...@safeport.com
Voice: 301-217-9220
  Fax: 301-217-9277
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: How to know % of read file in cat?

2013-03-09 Thread Luís Fernando Schultz Xavier da Silveira
You might want to try the sysutils/pv port, which is a small
program that works like cat, but provides a progress bar.

On Sat, Mar 09, 2013 at 10:54:00AM +0100, Eduardo Morras wrote:
 
 Hello,
 
 I use cat to read a file and pass it to another app, the command is this:
 
 camibar% cat file.git | fossil import --git file.fossil
 
 It takes a lot of time, file.git is 12GB, and i want to know if there's some 
 'magic' trick can I use to show me how many bytes or the % of the file.git 
 cat sent to the other app.
 
 Maybe cat isn't the correct tool?
 
 Thanks.
 
 
 ---   ---
 Eduardo Morras emorr...@yahoo.es
 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
 
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: svn new pkg system

2013-03-09 Thread Robert Huff

Giorgos Keramidas writes:

   Is svn going to become part of the base system in 9.2-RELEASE?
  
  No.

[good reasons for not including subversion ellided]

On the other hand ...
The traditional - and I believe still canonical - way of
updating the system is to recompile from source.
I know I am not alone in feeling the system is substantially
incomplete if it does not come with all the tools necessary to do
that.
(Not slighting freebsd-update (don't know enough about it to
have an opinion); just pointing out it has limitations.)

Respectfully,


Robert Huff

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


periodic security always sends output mail

2013-03-09 Thread Steve Rikli
I would like to configure periodic on my FreeBSD servers to only send
daily/weekly/monthly/security mails (or logs) when there is something
important to report.

I'm close, but periodic security seems to _always_ send mail, even
when there is nothing to report.  My periodic.conf.local has these
pertinent lines (ignore weekly and monthly for now):

daily_show_success=NO
security_show_success=NO

daily_show_info=NO
security_show_info=NO

This has the desired effect on daily -- no mail unless something has
happened.  And it _almost_ works for security, but it still sends a
nearly-empty report with only this:

Security check:

-- End of daily output --

That behavior is the same whether security is a separate report or
included into daily using daily_status_security_inline=YES.

I think the reason is /etc/periodic/daily/450.status-security sets
rc=3 after running 'periodic security', and so there's no way to
mask the output.

Is there some other (preferably supported) means of achieving the
goal of no mail or log unless there's something to report?

Thanks,
sr.
-- 
|| Steve Rikli ||| Well, we've stared at it... that oughta ||
|| Systems Administrator   ||| fix it!  Let's get outta here.  ||
|| Genyosha Networks   ||| ||
|| s...@genyosha.net |||   - Crow, MST3K ||

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: svn new pkg system

2013-03-09 Thread pete wright
On Sat, Mar 9, 2013 at 3:25 PM, Fbsd8 fb...@a1poweruser.com wrote:
 Is svn going to become part of the base system in 9.2-RELEASE?


not sure about svn, but this port has recently been commited:

http://www.freshports.org/net/svnup/

it is a csup replacement.

-pete

-- 
pete wright
www.nycbug.org
@nomadlogicLA
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: vlan routing

2013-03-09 Thread Виталий Туровец
2013/3/10  d...@safeport.com:
 I am trying set this up. First I munged the IP addresses. Not to worry if I
 hit yours. I did the following commands:

ifconfig vlan0 create
ifconfig vlan0 vlan 95 vlandev fxp0
ifconfig vlan0 inet 134.217.128.117 netmask 255.255.255.0
ifconfig fxp0 add 134.217.128.117 netmask 255.255.255.0
route add -inet 134.217.128.117 134.217.128.1

 ifconfig shows:

 fxp0: flags=8843UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST metric 0 mtu 1500
 options=8VLAN_MTU
 ether 00:d0:b7:56:cf:ab
 inet 45.22.17.3 netmask 0xfc00 broadcast 45.22.19.255
 inet 45.22.17.17 netmask 0x broadcast 45.22.17.17
 inet 134.217.128.117 netmask 0xff00 broadcast 134.217.128.255
 media: Ethernet autoselect (100baseTX full-duplex)
 status: active
 bge0: flags=8802BROADCAST,SIMPLEX,MULTICAST metric 0 mtu 1500
 options=9bRXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM
 ether 00:09:5b:60:e4:1f
 media: Ethernet autoselect (none)
 status: no carrier
 vlan0: flags=8843UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST metric 0 mtu 1500
 ether 00:d0:b7:56:cf:ab
 inet 134.217.128.117 netmask 0xff00 broadcast 134.217.128.255
 media: Ethernet autoselect (100baseTX full-duplex)
 status: active
 vlan: 95 parent interface: fxp0

 Needless to say it does not work. The switch is programmed correctly (I am
 told). My questions are (1) it seems like the option got applied to the
 wrong interface; (2) what did I miss??

 I also tried booting the system with IP of 134.217.128.117 but I did not get
 the rc.conf macros correctly. I do know I can not route through the switch
 without going the vlan commands.

 _
 Douglas Denault
 http://www.safeport.com
 d...@safeport.com
 Voice: 301-217-9220
   Fax: 301-217-9277
 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org

I guess you shouldn't put the same IP address on two interfaces (vlan
and fxp0), you need to decide wherther you need tagged or untagged
vlan frames there and, depending on this decision put the IP address
on VLAN interface (tagged variant) or fxp0 (untagged one).

If i understand your task correctly, then this line is faulty from
your configuration:
ifconfig fxp0 add 134.217.128.117 netmask 255.255.255.0
You don't need it.

route add -inet 134.217.128.117 134.217.128.1
This is smth absoulutely wrong:)

Basically, if you only need a vlan interface that could be used for
routing, you need these commands only:

ifconfig vlan95 create
ifconfig vlan95 inet 134.217.128.117/24 vlan 95 vlandev fxp0

and in /etc/rc.conf you should put such strings:

cloned_interfaces=vlan95
ifconfig_vlan95=inet 134.217.128.117/24 vlan 95 vlandev fxp0

for the interface to be created on reboot.
Hope this helps.

--



~~~
WBR,
Vitaliy Turovets
NOC Lead @TV-Net ISP
NOC Lead @Service Outsourcing company
+38(093)265-70-55
VITU-RIPE
X-NCC-RegID: ua.tv
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org