mersenneforum.org

mersenneforum.org (https://www.mersenneforum.org/index.php)
-   Linux (https://www.mersenneforum.org/forumdisplay.php?f=39)
-   -   Beep ( from pieso speaker ( motherboard) and Mprime (https://www.mersenneforum.org/showthread.php?t=24482)

pepi37 2019-06-01 22:49

Beep ( from pieso speaker ( motherboard) and Mprime
 
I buy new SSD for my linux machine and install latest version od Debian netinstall.
So I dont have any GUI.
So my problem is: if I login to console and start mprime and mprime find PRP then pieso speaker from motherboard start to do beep :)
But if I start mprime via crontab then pieso speaker dont produce any sound if PRP is found.
Any solution?

S485122 2019-06-02 08:33

I think that this could help : when in console mode you can use the menu item 14 to set "Make noise if new Mersenne prime is found" to "N" or you can just add the line "SilentVictory=1" to prime.txt.

Jacob

pepi37 2019-06-02 12:35

[QUOTE=S485122;518330]I think that this could help : when in console mode you can use the menu item 14 to set "Make noise if new Mersenne prime is found" to "N" or you can just add the line "SilentVictory=1" to prime.txt.

Jacob[/QUOTE]
That will stop beep tone. And I need opposite :) - I need beep tone :)

Xyzzy 2019-06-02 14:38

Maybe:

[C]SilentVictory=0[/C]

S485122 2019-06-02 15:35

Oups ! Indeed I read what I would want : no noise.

As far as I understand things when you run the program through crontab the output goes to a logfile by default. Since the "beeps" are printed to the standard output they will be in the file. You should have crontab start a terminal session that will run mprime.(or something like that.)

Jacob

pepi37 2019-06-02 17:32

[QUOTE=S485122;518370]Oups ! Indeed I read what I would want : no noise.

As far as I understand things when you run the program through crontab the output goes to a logfile by default. Since the "beeps" are printed to the standard output they will be in the file. [COLOR=Red][B]You should have crontab start a terminal session that will run mprime.(or something like that[/B][/COLOR].)

Jacob[/QUOTE]


Yes, I noticed a huge number of letter "G" when PRP is found and beep start.


Anyone have idea how to start terminal and mprime inside with crontab

Nick 2019-06-02 21:28

Unprivileged users are not usually allowed to write to the console unless they are logged in on it because of the inherent security risks.
If this is not an issue on your machine, you can change the permissions and then add
[CODE]>/dev/console 2>&1[/CODE]to the end of the line in the crontab file.

pepi37 2019-06-02 22:00

[QUOTE=Nick;518394]Unprivileged users are not usually allowed to write to the console unless they are logged in on it because of the inherent security risks.
If this is not an issue on your machine, you can change the permissions and then add
[CODE][COLOR=Red][B]>/dev/console 2>&1[/B][/COLOR][/CODE]to the end of the line in the crontab file.[/QUOTE]


Nick this [B]work perfect,[/B] but now I lost logging, since I redirect all output text to log file.
I found that in same rare situations I can be without results or two ( lost in space) and found they are present in log file.

Any suggestion for this?

Nick 2019-06-02 22:31

[QUOTE=pepi37;518400]Any suggestion for this?[/QUOTE]
Try this instead on the end of the line in the crontab:
[CODE] | tee logfile.txt >/dev/console [/CODE]

pepi37 2019-06-02 22:58

[QUOTE=Nick;518403]Try this instead on the end of the line in the crontab:
[CODE] | tee logfile.txt >/dev/console [/CODE][/QUOTE]




Thanks a million times, all I need it to add -a so content of file is append in case of reboot :)
Now I have what I need!
Thanks once more time.


All times are UTC. The time now is 08:58.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.