ALT Linux Community general discussions
 help / color / mirror / Atom feed
From: <kastelli@smtp.ru>
To: <community@altlinux.ru>
Subject: Re: [Comm] nut
Date: Mon, 17 Jan 2005 10:47:01 +0300 (MSK)
Message-ID: <200501170747.j0H7l1kB008411@www8.pochta.ru> (raw)

В сообщении от Пятница 14 Январь 2005 08:19 Дворников
Михаил написал(a):
> kastelli@smtp.ru пишет:
> > У меня стоин nut-2.0.0 и прекрасно выключает машину,
> > когда батаеря разряжается.
>
> Мои настройки:
> upsmon.conf:
>   NOTIFYFLAG ONLINE SYSLOG
>   NOTIFYFLAG ONBATT SYSLOG+WALL+EXEC
>   NOTIFYFLAG LOWBATT  SYSLOG+WALL+EXEC
>   POWERDOWNFLAG /etc/killpower
>   # NOTIFYCMD /usr/....
>
> Нужно указать:
>   NOTIFYCMD shutdown  ?

Зачем NOTIFYCMD для выключения?
укажи:
SHUTDOWNCMD \"/sbin/shutdown -h +0\"
и этого будет достаточно.

Вот что примерно д.б. в этом конфиге:
RUN_AS_USER root
MONITOR myups@localhost 1 root root master 
# myups -- это имя UPS, описанное в ups.conf
MINSUPPLIES 1
SHUTDOWNCMD \"/sbin/shutdown -h +0\"
POLLFREQ 5
POLLFREQALERT 5
HOSTSYNC 15
DEADTIME 15
POWERDOWNFLAG /etc/killpower
RBWARNTIME 43200
NOCOMMWARNTIME 300
FINALDELAY 5

> Нужно использовать upsshed.conf ?
> В upsshed.conf создавал таймеры и указывал свой
скрипт для выключения,
> например создать файл. Но этот скрипт не запускается,
> хотя в логах есть сообщение о переходе на батарею
(NOTIFYFLAG ONBATT).
Права доступа на файл(ы) в порядке?
> 1) Как сделать выключение компьютера через 10 минут
работы от батареи
> или при разряде батареи?
Нужно править  upsshed.conf
Чтоб выключение сработало,  я не делал, однако скрипты
(которые я вызывал) запускались. 
Да, и upsmon д.б. запущен!
> 2) Для чего нужен /etc/killpower? Сейчас он не создается.
В доках есть файлик shutdown.txt, который описывает
механизм работы upsdrvctl, там же есть описание файла
/etc/killpower (upsmon  создает этот файл, если
находится в режиме master, когда UPS д.б. выключен)


                 reply	other threads:[~2005-01-17  7:47 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200501170747.j0H7l1kB008411@www8.pochta.ru \
    --to=kastelli@smtp.ru \
    --cc=community@altlinux.ru \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

ALT Linux Community general discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/community/0 community/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 community community/ http://lore.altlinux.org/community \
		mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com
	public-inbox-index community

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.community


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git