Bitcoin Forum
August 17, 2018, 04:00:39 PM *
News: Latest stable version of Bitcoin Core: 0.16.2  [Torrent].
 
   Home   Help Search Donate Login Register  
Pages: « 1 ... 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 [282] 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 ... 406 »
  Print  
Author Topic: [OS] nvOC easy-to-use Linux Nvidia Mining vBASIC || Community Edition 2.0  (Read 387860 times)
Stubo
Member
**
Offline Offline

Activity: 209
Merit: 13


View Profile
November 15, 2017, 04:44:38 PM
 #5621

Another IAmNotAJeep_and_Maxximus007_WATCHDOG Mod

I had my Verizon FIOS service upgraded the other day and I was unable to shutdown all of my miners before the tech interrupted my internet. This made me scrutinize how the watchdog handles that situation (not very well, IMO) so I made the following modification to just wait on internet service to return rather than just looping, restarting mining, and restarting the host as usual.

Code:
<cut>
      if [ $COUNT -le 0 ]
      then
# Begin Stubo Mod
# Wait for Internet
         while ! nc -vzw1 google.com 443;
         do
   echo "Internet is down, checking again in 30 seconds..." | tee -a ${LOG_FILE} ${ALERT_LOG_FILE}
            sleep 30
         done
#
#         INTERNET_IS_GO=0
#  
#         if nc -vzw1 google.com 443;
#         #if nc -vzw1 $POOL 80;
#         then
#            INTERNET_IS_GO=1
#         fi
         echo ""

#         if [[ $RESTART -gt 4 && $INTERNET_IS_GO == 1 ]]
         if [ $RESTART -gt 4 ]
         # End Stubo Mod
         then
            echo "$(date) - Utilization is too low: reviving did not work so restarting system in 10 seconds" | tee -a ${LOG_FILE} ${ALERT_LOG_FILE}
<cut>

Let me know if you have any questions or see room for improvement in this modification.


I just made some changes to your addition so after checking google for internet it checks coin pool server then it goes for the rest of its job ...
Because I'm not using any dual coin mining and salfter switches I havent gone through the hassle of checking their pool too.

Please check, test and let me know what you think


Code:
<cut>


  if [ $COUNT -le 0 ]
      then
# Begin Stubo Mod
# Wait for Internet
         while ! nc -vzw1 google.com 443;
         do
   echo "Internet is down, checking again in 30 seconds..." | tee -a ${LOG_FILE} ${ALERT_LOG_FILE}
            sleep 30
         done

       # Begin papampi Mod

source /home/m1/1bash

CURRENT_COIN=$(head -n 200 /home/m1/1bash | grep COIN= | sed 's/COIN=//' | sed 's/\"//' | sed 's/\"//')
#echo "$CURRENT_COIN"

CURRENT_COIN_POOL=$(echo {$CURRENT_COIN}_POOL |sed 's/{//' | sed 's/}//' )
#echo $CURRENT_COIN_POOL

POOL_SERVER=$(cat /home/m1/1bash | grep $CURRENT_COIN_POOL | grep -o '".*"' | sed 's/"//'| sed 's/"//')
#echo "$POOL_SERVER"

CURRENT_COIN_PORT=$(echo {$CURRENT_COIN}_PORT | sed 's/{//' | sed 's/}//')
#echo "$CURRENT_COIN_PORT"

if [[ $POOL_SERVER == *stratum* ]]
then
    #echo "stratum"
    PING_SERVER=$( cat /home/m1/1bash | grep $CURRENT_COIN_POOL | grep -o '".*"' | sed 's/"//'| sed 's/"//' | sed 's/stratum+tcp\?:\/\///' | cut -d':' -f1 )
    #echo "Server: $PING_SERVER"
    PING_PORT=$(cat /home/m1/1bash | grep $CURRENT_COIN_POOL | grep -o '".*"' | sed 's/"//'| sed 's/"//' | sed 's/stratum+tcp\?:\/\///' | grep -Eo '[0-9]+$' )
    #echo "Port: $PING_PORT"    

if nc -vzw2 $PING_SERVER $PING_PORT;
    then
        # echo "Strartum Server, INTERNET_IS_GO=1"
        INTERNET_IS_GO=1
    else
        echo "WARNING:  $(date) - Mining Pool Stratum Server is DOWN" | tee -a ${LOG_FILE} ${ALERT_LOG_FILE}
        INTERNET_IS_GO=0
    fi
    
elif [[ $CURRENT_COIN == *DUAL*  || $CURRENT_COIN == *ZPOOL_SKUNK* || $CURRENT_COIN == *SALFTER*  ]]
then
    #echo "Dual mining, check google"
    if nc -vzw2 google.com 443
    then
        # echo "Dual mining, google is up"
        #echo "            INTERNET_IS_GO=1"
        INTERNET_IS_GO=1
    else
        #echo "Dual mining, google is down"
        echo "WARNING:  $(date) - Cant reach google" | tee -a ${LOG_FILE} ${ALERT_LOG_FILE}
        INTERNET_IS_GO=0
    fi
    
else
      PING_SERVER=$( cat /home/m1/1bash | grep $CURRENT_COIN_POOL | grep -o '".*"' | sed 's/"//'| sed 's/"//')
      #echo "Server: $PING_SERVER"
      PING_PORT=$(cat /home/m1/1bash | grep $CURRENT_COIN_PORT | grep -o '".*"' | sed 's/"//' |sed 's/"//')
      #echo "Port: $PING_PORT"
      if nc -vzw1 $PING_SERVER $PING_PORT
    then
        #echo "Not a stratum server,INTERNET_IS_GO=1" | tee -a ${LOG_FILE}
        INTERNET_IS_GO=1
    else
        echo "WARNING:  $(date) - Mining Pool Server is DOWN" | tee -a ${LOG_FILE} ${ALERT_LOG_FILE}
        INTERNET_IS_GO=0
    fi
fi


       # End papampi Mod


#         INTERNET_IS_GO=0
 
#         if nc -vzw1 google.com 443;
#         #if nc -vzw1 $POOL 80;
#         then
#            INTERNET_IS_GO=1
#         fi
         echo ""

         if [[ $RESTART -gt 4 && $INTERNET_IS_GO == 1 ]]
#         if [ $RESTART -gt 4 ]
         # End Stubo Mod
         then
            echo "$(date) - Utilization is too low: reviving did not work so restarting system in 10 seconds" | tee -a ${LOG_FILE} ${ALERT_LOG_FILE}


<cut>

Edited to add server port too.

Sorry, I don't like this at all. You are making a lot of assumptions there and, IMO, mucking up an already confusing script with logic is doesn't need. First you are assuming that folks are using your autoswitch and I think some/most are not. I tried it, it worked, but mining that way (most profitable at the time) doesn't fit my personal mining philosophy. When I make modifications that I share with others, they are ones that generally everyone would appreciate. For example, faster down miner restarts, and better handling of internet down condition. While I appreciate that you are trying to make the watchdog better by detecting if the pool is down, I think that is just too difficult given how many different types of mining configurations are supported by nvOC. Besides that, pools being down are not a common occurrence in my personal, but limited, experience.

That being said, I think this type of modification is fine as a personal one. I just really don't think it is something that most users of nvOC would need. Instead, I think it could cause more problems than it resolves.

Just my 2 cents as always...
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1534521639
Hero Member
*
Offline Offline

Posts: 1534521639

View Profile Personal Message (Offline)

Ignore
1534521639
Reply with quote  #2

1534521639
Report to moderator
1534521639
Hero Member
*
Offline Offline

Posts: 1534521639

View Profile Personal Message (Offline)

Ignore
1534521639
Reply with quote  #2

1534521639
Report to moderator
CryptAtomeTrader44
Full Member
***
Offline Offline

Activity: 312
Merit: 103

It is easier to break an atom than partialities AE


View Profile
November 15, 2017, 06:09:47 PM
 #5622

wow, what a cool project!!

Sorry to barge in like this.  I am only on page 7 so far and am sure the answer to my question is in the next 273 pages Wink

Is there a way to run a script or is there a list of things to install on an existing Ubuntu LTS?
My rig is our media center and file share server, but would like to add a dozen cards or so (asus mining expert) to do some mining, as it is idle most of the time.

Thanks
366Cobra


I think its easier to reformat your existing ubuntu and install nvOC then install and set samba, nfs,... and any thing else you need for your media center instead of going through installing and setting up nvOC over an existing ubuntu.

I think his request seems quite interesting to me.
By developing an installable package on a stable "normal" ubuntu (I say normal to mean that this system would only be installed from the ISO provided by cannonical), Fullzero's scripts and all the others could be spread on much more mining rig.
I admit that it is also another work a little wider and tedious, but in fine, the nvOC package could thus be deployed much more widely and probably also on debian or probably other systems.

He would thus make a big competition to ethOS which makes pay his scripts, even if the first goal is not this one, that would perhaps make them review their commercial policy that personally, I find doubtful.
It would probably also bring other linuxians (called "bearded"!) :-) in some circles ha ha! ) to help this very active community of this thread to further optimize scripts and mining software.

Start with a package including software and scripts adapted for an ubuntu and then chained with a debian more classic and less heavy IMO, and observe if this package could interest the other communities of the other banks of Linux like RED HAT, Fedora and / or Mint ... etc.

Would not it be judicious also to reserve this distribution Ubuntu to the beginners with Linux because it is necessary to recognize this to him, ubuntu tries then a few years to convert the workstations windows to Linux.
In my country, it has done rather well to the national gendarmerie! A civil branch of the police.

I think it would be interesting to put these scripts on a system less heavy volume in one way or another.

I hope that what I am trying to express is understandable to some of those who have read this post.

BIOSTAR TB250-BTC PRO + 5x GTX 1070 8G OC + 5 GTX 1060 6G Minning in WTM Protit Switching
leenoox
Full Member
***
Offline Offline

Activity: 200
Merit: 101



View Profile
November 15, 2017, 06:38:50 PM
 #5623

wow, what a cool project!!

Sorry to barge in like this.  I am only on page 7 so far and am sure the answer to my question is in the next 273 pages Wink

Is there a way to run a script or is there a list of things to install on an existing Ubuntu LTS?
My rig is our media center and file share server, but would like to add a dozen cards or so (asus mining expert) to do some mining, as it is idle most of the time.

Thanks
366Cobra


I think its easier to reformat your existing ubuntu and install nvOC then install and set samba, nfs,... and any thing else you need for your media center instead of going through installing and setting up nvOC over an existing ubuntu.

I think his request seems quite interesting to me.
By developing an installable package on a stable "normal" ubuntu (I say normal to mean that this system would only be installed from the ISO provided by cannonical), Fullzero's scripts and all the others could be spread on much more mining rig.
I admit that it is also another work a little wider and tedious, but in fine, the nvOC package could thus be deployed much more widely and probably also on debian or probably other systems.

He would thus make a big competition to ethOS which makes pay his scripts, even if the first goal is not this one, that would perhaps make them review their commercial policy that personally, I find doubtful.
It would probably also bring other linuxians (called "bearded"!) :-) in some circles ha ha! ) to help this very active community of this thread to further optimize scripts and mining software.

Start with a package including software and scripts adapted for an ubuntu and then chained with a debian more classic and less heavy IMO, and observe if this package could interest the other communities of the other banks of Linux like RED HAT, Fedora and / or Mint ... etc.

Would not it be judicious also to reserve this distribution Ubuntu to the beginners with Linux because it is necessary to recognize this to him, ubuntu tries then a few years to convert the workstations windows to Linux.
In my country, it has done rather well to the national gendarmerie! A civil branch of the police.

I think it would be interesting to put these scripts on a system less heavy volume in one way or another.

I hope that what I am trying to express is understandable to some of those who have read this post.

The idea is nice but not quite practical. There are a lot of differences between linux distros and their backbone so such a project would require quite a big team of developers and testers to execute. Just see what happened few weeks back when ubuntu pushed updates... screwed up the operation on single distro, single version.... imagine if we had 6-7 different distros... even the big software companies don't support more than 3-4 main distrubutions of linux.
Different distros handle libraries, drivers, config files differently, not to mention the selection of preinstalled software... it will be impossible to support that from a community driven free project like this

papampi
Full Member
***
Offline Offline

Activity: 378
Merit: 105


Linux FOREVER! Resistance is futile!!!


View Profile
November 15, 2017, 06:50:20 PM
 #5624

Another IAmNotAJeep_and_Maxximus007_WATCHDOG Mod

I had my Verizon FIOS service upgraded the other day and I was unable to shutdown all of my miners before the tech interrupted my internet. This made me scrutinize how the watchdog handles that situation (not very well, IMO) so I made the following modification to just wait on internet service to return rather than just looping, restarting mining, and restarting the host as usual.

Code:
<cut>
      if [ $COUNT -le 0 ]
      then
# Begin Stubo Mod
# Wait for Internet
         while ! nc -vzw1 google.com 443;
         do
   echo "Internet is down, checking again in 30 seconds..." | tee -a ${LOG_FILE} ${ALERT_LOG_FILE}
            sleep 30
         done
#
#         INTERNET_IS_GO=0
#  
#         if nc -vzw1 google.com 443;
#         #if nc -vzw1 $POOL 80;
#         then
#            INTERNET_IS_GO=1
#         fi
         echo ""

#         if [[ $RESTART -gt 4 && $INTERNET_IS_GO == 1 ]]
         if [ $RESTART -gt 4 ]
         # End Stubo Mod
         then
            echo "$(date) - Utilization is too low: reviving did not work so restarting system in 10 seconds" | tee -a ${LOG_FILE} ${ALERT_LOG_FILE}
<cut>

Let me know if you have any questions or see room for improvement in this modification.


I just made some changes to your addition so after checking google for internet it checks coin pool server then it goes for the rest of its job ...
Because I'm not using any dual coin mining and salfter switches I havent gone through the hassle of checking their pool too.

Please check, test and let me know what you think


Code:
<cut>


  if [ $COUNT -le 0 ]
      then
# Begin Stubo Mod
# Wait for Internet
         while ! nc -vzw1 google.com 443;
         do
   echo "Internet is down, checking again in 30 seconds..." | tee -a ${LOG_FILE} ${ALERT_LOG_FILE}
            sleep 30
         done

       # Begin papampi Mod

source /home/m1/1bash

CURRENT_COIN=$(head -n 200 /home/m1/1bash | grep COIN= | sed 's/COIN=//' | sed 's/\"//' | sed 's/\"//')
#echo "$CURRENT_COIN"

CURRENT_COIN_POOL=$(echo {$CURRENT_COIN}_POOL |sed 's/{//' | sed 's/}//' )
#echo $CURRENT_COIN_POOL

POOL_SERVER=$(cat /home/m1/1bash | grep $CURRENT_COIN_POOL | grep -o '".*"' | sed 's/"//'| sed 's/"//')
#echo "$POOL_SERVER"

CURRENT_COIN_PORT=$(echo {$CURRENT_COIN}_PORT | sed 's/{//' | sed 's/}//')
#echo "$CURRENT_COIN_PORT"

if [[ $POOL_SERVER == *stratum* ]]
then
    #echo "stratum"
    PING_SERVER=$( cat /home/m1/1bash | grep $CURRENT_COIN_POOL | grep -o '".*"' | sed 's/"//'| sed 's/"//' | sed 's/stratum+tcp\?:\/\///' | cut -d':' -f1 )
    #echo "Server: $PING_SERVER"
    PING_PORT=$(cat /home/m1/1bash | grep $CURRENT_COIN_POOL | grep -o '".*"' | sed 's/"//'| sed 's/"//' | sed 's/stratum+tcp\?:\/\///' | grep -Eo '[0-9]+$' )
    #echo "Port: $PING_PORT"    

if nc -vzw2 $PING_SERVER $PING_PORT;
    then
        # echo "Strartum Server, INTERNET_IS_GO=1"
        INTERNET_IS_GO=1
    else
        echo "WARNING:  $(date) - Mining Pool Stratum Server is DOWN" | tee -a ${LOG_FILE} ${ALERT_LOG_FILE}
        INTERNET_IS_GO=0
    fi
    
elif [[ $CURRENT_COIN == *DUAL*  || $CURRENT_COIN == *ZPOOL_SKUNK* || $CURRENT_COIN == *SALFTER*  ]]
then
    #echo "Dual mining, check google"
    if nc -vzw2 google.com 443
    then
        # echo "Dual mining, google is up"
        #echo "            INTERNET_IS_GO=1"
        INTERNET_IS_GO=1
    else
        #echo "Dual mining, google is down"
        echo "WARNING:  $(date) - Cant reach google" | tee -a ${LOG_FILE} ${ALERT_LOG_FILE}
        INTERNET_IS_GO=0
    fi
    
else
      PING_SERVER=$( cat /home/m1/1bash | grep $CURRENT_COIN_POOL | grep -o '".*"' | sed 's/"//'| sed 's/"//')
      #echo "Server: $PING_SERVER"
      PING_PORT=$(cat /home/m1/1bash | grep $CURRENT_COIN_PORT | grep -o '".*"' | sed 's/"//' |sed 's/"//')
      #echo "Port: $PING_PORT"
      if nc -vzw1 $PING_SERVER $PING_PORT
    then
        #echo "Not a stratum server,INTERNET_IS_GO=1" | tee -a ${LOG_FILE}
        INTERNET_IS_GO=1
    else
        echo "WARNING:  $(date) - Mining Pool Server is DOWN" | tee -a ${LOG_FILE} ${ALERT_LOG_FILE}
        INTERNET_IS_GO=0
    fi
fi


       # End papampi Mod


#         INTERNET_IS_GO=0
 
#         if nc -vzw1 google.com 443;
#         #if nc -vzw1 $POOL 80;
#         then
#            INTERNET_IS_GO=1
#         fi
         echo ""

         if [[ $RESTART -gt 4 && $INTERNET_IS_GO == 1 ]]
#         if [ $RESTART -gt 4 ]
         # End Stubo Mod
         then
            echo "$(date) - Utilization is too low: reviving did not work so restarting system in 10 seconds" | tee -a ${LOG_FILE} ${ALERT_LOG_FILE}


<cut>

Edited to add server port too.

Sorry, I don't like this at all. You are making a lot of assumptions there and, IMO, mucking up an already confusing script with logic is doesn't need. First you are assuming that folks are using your autoswitch and I think some/most are not. I tried it, it worked, but mining that way (most profitable at the time) doesn't fit my personal mining philosophy. When I make modifications that I share with others, they are ones that generally everyone would appreciate. For example, faster down miner restarts, and better handling of internet down condition. While I appreciate that you are trying to make the watchdog better by detecting if the pool is down, I think that is just too difficult given how many different types of mining configurations are supported by nvOC. Besides that, pools being down are not a common occurrence in my personal, but limited, experience.

That being said, I think this type of modification is fine as a personal one. I just really don't think it is something that most users of nvOC would need. Instead, I think it could cause more problems than it resolves.

Just my 2 cents as always...

I noticed a commented out pool check from fullzero and remembered he once said he wanted to add it to wdog when a while back one of the pools went down and caused a massive number of users get so many reboots, I myself was one of them, so I thought it could be a good addition to wdog.
And yes there are so many different types of mining configuration in nvOC but I think there is only 2 types of server usage in the miners and what I wrote covers both (server:port or --server --port )

Dont know whats checking if pool is online or not for wdog before restart miner and get to rebooting loop has to do with wtm auto switch though ... seems you are mixing 2 different things together.
I wrote wtm auto switch for my own usage and shared it with the community the same as I done with other stuff and I will keep sharing and dont care if only one person use it or all.

Thanks for your input any way  Wink

Rumo
Jr. Member
*
Offline Offline

Activity: 39
Merit: 0


View Profile
November 15, 2017, 06:53:41 PM
 #5625

wow, what a cool project!!

Sorry to barge in like this.  I am only on page 7 so far and am sure the answer to my question is in the next 273 pages Wink

Is there a way to run a script or is there a list of things to install on an existing Ubuntu LTS?
My rig is our media center and file share server, but would like to add a dozen cards or so (asus mining expert) to do some mining, as it is idle most of the time.

Thanks
366Cobra


I think its easier to reformat your existing ubuntu and install nvOC then install and set samba, nfs,... and any thing else you need for your media center instead of going through installing and setting up nvOC over an existing ubuntu.

I think his request seems quite interesting to me.
By developing an installable package on a stable "normal" ubuntu (I say normal to mean that this system would only be installed from the ISO provided by cannonical), Fullzero's scripts and all the others could be spread on much more mining rig.
I admit that it is also another work a little wider and tedious, but in fine, the nvOC package could thus be deployed much more widely and probably also on debian or probably other systems.

He would thus make a big competition to ethOS which makes pay his scripts, even if the first goal is not this one, that would perhaps make them review their commercial policy that personally, I find doubtful.
It would probably also bring other linuxians (called "bearded"!) :-) in some circles ha ha! ) to help this very active community of this thread to further optimize scripts and mining software.

Start with a package including software and scripts adapted for an ubuntu and then chained with a debian more classic and less heavy IMO, and observe if this package could interest the other communities of the other banks of Linux like RED HAT, Fedora and / or Mint ... etc.

Would not it be judicious also to reserve this distribution Ubuntu to the beginners with Linux because it is necessary to recognize this to him, ubuntu tries then a few years to convert the workstations windows to Linux.
In my country, it has done rather well to the national gendarmerie! A civil branch of the police.

I think it would be interesting to put these scripts on a system less heavy volume in one way or another.

I hope that what I am trying to express is understandable to some of those who have read this post.

The idea is nice but not quite practical. There are a lot of differences between linux distros and their backbone so such a project would require quite a big team of developers and testers to execute. Just see what happened few weeks back when ubuntu pushed updates... screwed up the operation on single distro, single version.... imagine if we had 6-7 different distros... even the big software companies don't support more than 3-4 main distrubutions of linux.
Different distros handle libraries, drivers, config files differently, not to mention the selection of preinstalled software... it will be impossible to support that from a community driven free project like this

I agree. I wrote just little scripts for a linux app and to get it running with different distros was the most problematic part.
papampi
Full Member
***
Offline Offline

Activity: 378
Merit: 105


Linux FOREVER! Resistance is futile!!!


View Profile
November 15, 2017, 06:56:04 PM
 #5626

I have 5 rigs running on 19, and set up my first on the 19.4 two days ago. This morning I tried to make a change to 1bash and it would not let me because of no disk space.

I did some searching and found a 6.4 GB file sreenlog.0 I deleted it and then tried to nano 1 bash and it gave an error about a 1bash.swp lock file. I used VI and was able to delete the sap file and now nano works and I edited the 1 bash.

What is up with this huge screen log.0 file and how can I keep it from creating this?

Thanks


I guess you are the first to report this problem... I expect the forum to be flooded with this same issue soon.

I've been talking about this upcomming problem for a while now... the abuse of logs and recording everything while completely unnecessary.

Recording a log that will eventually fill up all the empty space just to show one line from it in the telegram message is not smart programming... pretty much all the scripts that rely on these logs will have to be rewritten to keep the logs under control.

Devs, if you realy need that log, create a ramdisk (tmpfs) and record screenlog (or whatever other log you need) there and create a cronjob to periodicaly clean it. There's really nothing important from screenlog that needs to be permanently recorded so a, lets say 100 MB ramdisk is perfect solution. Direct the logs there, extract whatever you need when the script is run, then flush the log. Shouldn't be very difficult to do Wink

I heard you mate and started to changing my codes to use named pipes , cant give any ETA, but will do my best to get them ready for next version.

bdog1234
Full Member
***
Offline Offline

Activity: 134
Merit: 100


View Profile
November 15, 2017, 07:15:08 PM
 #5627

I have 5 rigs running on 19, and set up my first on the 19.4 two days ago. This morning I tried to make a change to 1bash and it would not let me because of no disk space.

I did some searching and found a 6.4 GB file sreenlog.0 I deleted it and then tried to nano 1 bash and it gave an error about a 1bash.swp lock file. I used VI and was able to delete the sap file and now nano works and I edited the 1 bash.

What is up with this huge screen log.0 file and how can I keep it from creating this?

Thanks


Thats the miner output log , but cant be 6 GB, Some thing is not right

You can set clear logs on reboot in 1bash

When you record whole output from the miner 24/7 it sure can reach 6 GB in a week or two... or even sooner, no surprise there

Mining etc for 3 weeks (13 gpus rig non stop) let me a 128Mg file using Claymore. I still think 6Gb its too much

In a little under 4 hours it is 2.1 MB. I deleted the log and did a reboot. I don't see how it reached 6GB but it did.

Code:
m1@19_1_4:~$ ls -lah screenlog.0
-rw-rw-r-- 1 m1 m1 2.1M Nov 15 12:11 screenlog.0
m1@19_1_4:~$ uptime
 12:11:59 up  3:50,  4 users,  load average: 1.77, 1.76, 1.78



CryptAtomeTrader44
Full Member
***
Offline Offline

Activity: 312
Merit: 103

It is easier to break an atom than partialities AE


View Profile
November 15, 2017, 07:54:06 PM
 #5628

wow, what a cool project!!

Sorry to barge in like this.  I am only on page 7 so far and am sure the answer to my question is in the next 273 pages Wink

Is there a way to run a script or is there a list of things to install on an existing Ubuntu LTS?
My rig is our media center and file share server, but would like to add a dozen cards or so (asus mining expert) to do some mining, as it is idle most of the time.

Thanks
366Cobra


I think its easier to reformat your existing ubuntu and install nvOC then install and set samba, nfs,... and any thing else you need for your media center instead of going through installing and setting up nvOC over an existing ubuntu.

I think his request seems quite interesting to me.
By developing an installable package on a stable "normal" ubuntu (I say normal to mean that this system would only be installed from the ISO provided by cannonical), Fullzero's scripts and all the others could be spread on much more mining rig.
I admit that it is also another work a little wider and tedious, but in fine, the nvOC package could thus be deployed much more widely and probably also on debian or probably other systems.

He would thus make a big competition to ethOS which makes pay his scripts, even if the first goal is not this one, that would perhaps make them review their commercial policy that personally, I find doubtful.
It would probably also bring other linuxians (called "bearded"!) :-) in some circles ha ha! ) to help this very active community of this thread to further optimize scripts and mining software.

Start with a package including software and scripts adapted for an ubuntu and then chained with a debian more classic and less heavy IMO, and observe if this package could interest the other communities of the other banks of Linux like RED HAT, Fedora and / or Mint ... etc.

Would not it be judicious also to reserve this distribution Ubuntu to the beginners with Linux because it is necessary to recognize this to him, ubuntu tries then a few years to convert the workstations windows to Linux.
In my country, it has done rather well to the national gendarmerie! A civil branch of the police.

I think it would be interesting to put these scripts on a system less heavy volume in one way or another.

I hope that what I am trying to express is understandable to some of those who have read this post.

The idea is nice but not quite practical. There are a lot of differences between linux distros and their backbone so such a project would require quite a big team of developers and testers to execute. Just see what happened few weeks back when ubuntu pushed updates... screwed up the operation on single distro, single version.... imagine if we had 6-7 different distros... even the big software companies don't support more than 3-4 main distrubutions of linux.
Different distros handle libraries, drivers, config files differently, not to mention the selection of preinstalled software... it will be impossible to support that from a community driven free project like this
Yes, I understood what you are saying here. I am well aware of this diversity in Linux distributions. I was just saying that to make a package of a few MB available would be much better than putting an entire system!

For the other systems, those who would like it in the other communities would manage themselves to adapt them to their systems. It was not a question of wanting to control the other branches in a minnning system since this thread or even a dedicated project.

I only think that a simple package would be interesting elsewhere than on ubuntu.

Making an Ubuntu package should not be so different from making a package for Debian. And nothing prevents to continue to put in availability the current file of a whole system.

Finally, I ask myself a question: Would not it be possible to transfer a maximum of things that are not very useful for the mining for the most experienced? Most Linux users pilot their RIGs from another PC via SSH, so it seems to me that the graphics layer does not appear to be essential. This is just an example by others ...

While beginners or inexperienced would become recalcitrant, but nothing prevents to make a package with graphic layer and the other without a graphic layer.

For the graphical drivers pb of two weeks ago, yes, I remember, but Fullzero explained himself about it. he particularly mentioned his desire to keep up to date a certain number of things for safety for example.

In fact, it is always the same: a simple use for beginners and advanced use for "a little" more experienced. This is the problem of simple scripts that some people can not configure for lack of experience. I do not know where FZ0 is in its arbitration of several 1 bash and several 3main according to the various mining scripts provided at the beginning. I understood that he wanted to combine two types of versions: beginners and advanced users.

A package, only a package that would be intallable on a fresh installation of ubuntu (I probably have trouble expressing myself on this because I just wanted to indicate a package uniquemet pure ubuntu at the start, and others do what he wants, that's all). A package with a list of prerequisite tests to install the package.
The comamdne aptitude handles dependencies pretty well if I remember correctly. And even without such an automated installation script, it would be quite simple to list the necessary installation Before uncompressing the scripts and preamble and / or to make a simplified installation guide on a web page.

BIOSTAR TB250-BTC PRO + 5x GTX 1070 8G OC + 5 GTX 1060 6G Minning in WTM Protit Switching
Stubo
Member
**
Offline Offline

Activity: 209
Merit: 13


View Profile
November 15, 2017, 07:56:52 PM
 #5629


I noticed a commented out pool check from fullzero and remembered he once said he wanted to add it to wdog when a while back one of the pools went down and caused a massive number of users get so many reboots, I myself was one of them, so I thought it could be a good addition to wdog.
And yes there are so many different types of mining configuration in nvOC but I think there is only 2 types of server usage in the miners and what I wrote covers both (server:port or --server --port )

Dont know whats checking if pool is online or not for wdog before restart miner and get to rebooting loop has to do with wtm auto switch though ... seems you are mixing 2 different things together.
I wrote wtm auto switch for my own usage and shared it with the community the same as I done with other stuff and I will keep sharing and dont care if only one person use it or all.

Thanks for your input any way  Wink


This might be a better way to figure out the mining port generically. Assume that at some point, the connection from the miner on nvOC to the mining pool existed and we are trying to detect if the pool is down. If we were to capture the IP and port of this connection ahead of time and store it in a variable, we could then use this information when we detect that the GPU usage is too low (or the miner is no longer running), to determine if it was because the pool is unreachable. Naturally we want to make this both simple and elegant. To that end, take a look at what just simple usage of the netstat command reveals on my test rig:

Code:
m1@Testy:~$ netstat -nptw |grep ESTABLISHED
(Not all processes could be identified, non-owned process info
 will not be shown, you would have to be root to see it all.)
tcp        0      0 192.168.1.178:33432     94.23.199.191:3443      ESTABLISHED 2191/zm
tcp        0    232 192.168.1.178:22        192.168.1.5:52786       ESTABLISHED -
tcp        0      0 192.168.1.178:58320     45.79.223.173:20570     ESTABLISHED 2191/zm
tcp        0      0 192.168.1.178:42000     192.168.1.5:52973       ESTABLISHED 2191/zm

The 2nd one is port 22 (ssh) incoming for my session so that can be ignored. The last one is the telemetry/api of the miner that I have setup (port 42000) so that leaves the 1st and 3rd that we care about. This is further confirmed by the PID/program at the end. I am running DSTM's miner whose executable is zm. So, now if we use a more sophisticated way of finding these connections (requires the installation of gawk), we get:

Code:
m1@Testy:~$ FILTER=$(ss -tn state listening | gawk 'NR > 1 {n=split($3,A,":"); B[NR-1]=A[n]} END {for (i=1; i<length(B); i++) printf ":%s\\s{2}+|", B[i]; printf ":%s\\s{2}+", B[i]}')
m1@Testy:~$ ss -tn state established dst :* | grep -P -v "$FILTER"
Recv-Q Send-Q Local Address:Port               Peer Address:Port
0      0      192.168.1.178:33432              94.23.199.191:3443
0      0      192.168.1.178:58320              45.79.223.173:20570

I am thinking that the first IP/port is for the miner's DEV share and I am certain that the second is our connection to the mining pool (us-east.equihash-hub.miningpoolhub.com) since the destination port (20570) matches what I have configured in 1bash. So, assuming all of this is correct, we can then just use the same check to make sure that we can connect to both pools:

Code:
m1@Testy:~$ nc -vzw1 94.23.199.191 3443
Connection to 94.23.199.191 3443 port [tcp/*] succeeded!

m1@Testy:~$ nc -vzw1 45.79.223.173 20570
Connection to 45.79.223.173 20570 port [tcp/*] succeeded!

So, what is my point? My point is that I think the detection of the mining pool up/down status is a tricky one and therefore I think needs a robust solution which should work in all cases yet be simple enough to just take up a handful of lines of code. I offer the above one such potential solution.

Hope this helps.



leenoox
Full Member
***
Offline Offline

Activity: 200
Merit: 101



View Profile
November 15, 2017, 08:59:12 PM
 #5630

wow, what a cool project!!

Sorry to barge in like this.  I am only on page 7 so far and am sure the answer to my question is in the next 273 pages Wink

Is there a way to run a script or is there a list of things to install on an existing Ubuntu LTS?
My rig is our media center and file share server, but would like to add a dozen cards or so (asus mining expert) to do some mining, as it is idle most of the time.

Thanks
366Cobra


I think its easier to reformat your existing ubuntu and install nvOC then install and set samba, nfs,... and any thing else you need for your media center instead of going through installing and setting up nvOC over an existing ubuntu.

I think his request seems quite interesting to me.
By developing an installable package on a stable "normal" ubuntu (I say normal to mean that this system would only be installed from the ISO provided by cannonical), Fullzero's scripts and all the others could be spread on much more mining rig.
I admit that it is also another work a little wider and tedious, but in fine, the nvOC package could thus be deployed much more widely and probably also on debian or probably other systems.

He would thus make a big competition to ethOS which makes pay his scripts, even if the first goal is not this one, that would perhaps make them review their commercial policy that personally, I find doubtful.
It would probably also bring other linuxians (called "bearded"!) :-) in some circles ha ha! ) to help this very active community of this thread to further optimize scripts and mining software.

Start with a package including software and scripts adapted for an ubuntu and then chained with a debian more classic and less heavy IMO, and observe if this package could interest the other communities of the other banks of Linux like RED HAT, Fedora and / or Mint ... etc.

Would not it be judicious also to reserve this distribution Ubuntu to the beginners with Linux because it is necessary to recognize this to him, ubuntu tries then a few years to convert the workstations windows to Linux.
In my country, it has done rather well to the national gendarmerie! A civil branch of the police.

I think it would be interesting to put these scripts on a system less heavy volume in one way or another.

I hope that what I am trying to express is understandable to some of those who have read this post.

The idea is nice but not quite practical. There are a lot of differences between linux distros and their backbone so such a project would require quite a big team of developers and testers to execute. Just see what happened few weeks back when ubuntu pushed updates... screwed up the operation on single distro, single version.... imagine if we had 6-7 different distros... even the big software companies don't support more than 3-4 main distrubutions of linux.
Different distros handle libraries, drivers, config files differently, not to mention the selection of preinstalled software... it will be impossible to support that from a community driven free project like this
Yes, I understood what you are saying here. I am well aware of this diversity in Linux distributions. I was just saying that to make a package of a few MB available would be much better than putting an entire system!

For the other systems, those who would like it in the other communities would manage themselves to adapt them to their systems. It was not a question of wanting to control the other branches in a minnning system since this thread or even a dedicated project.

I only think that a simple package would be interesting elsewhere than on ubuntu.

Making an Ubuntu package should not be so different from making a package for Debian. And nothing prevents to continue to put in availability the current file of a whole system.

Finally, I ask myself a question: Would not it be possible to transfer a maximum of things that are not very useful for the mining for the most experienced? Most Linux users pilot their RIGs from another PC via SSH, so it seems to me that the graphics layer does not appear to be essential. This is just an example by others ...

While beginners or inexperienced would become recalcitrant, but nothing prevents to make a package with graphic layer and the other without a graphic layer.

For the graphical drivers pb of two weeks ago, yes, I remember, but Fullzero explained himself about it. he particularly mentioned his desire to keep up to date a certain number of things for safety for example.

In fact, it is always the same: a simple use for beginners and advanced use for "a little" more experienced. This is the problem of simple scripts that some people can not configure for lack of experience. I do not know where FZ0 is in its arbitration of several 1 bash and several 3main according to the various mining scripts provided at the beginning. I understood that he wanted to combine two types of versions: beginners and advanced users.

A package, only a package that would be intallable on a fresh installation of ubuntu (I probably have trouble expressing myself on this because I just wanted to indicate a package uniquemet pure ubuntu at the start, and others do what he wants, that's all). A package with a list of prerequisite tests to install the package.
The comamdne aptitude handles dependencies pretty well if I remember correctly. And even without such an automated installation script, it would be quite simple to list the necessary installation Before uncompressing the scripts and preamble and / or to make a simplified installation guide on a web page.

It's a bit more complicated than that... I am not saying that it can't be done but it's lots of work...

For example, what you call the graphic layer, the X server (or xorg) is essential service as the nvidia drivers will not load without it. So you can't have pure console experience running miner without the X server. On top of X server there are different graphical interfaces like unity (current implementation on nvOC), gnome, kde, etc... all requiring different setup. The base programs that come with one are not installed by default on another. They could be installed but sometimes they don't work well or don't work at all, eg. kde/gnome. A lot of scripts are hardcoded to work with guake which isn't installed by default on kde...
The default nvidia driver installed on nvOC is tweaked for ubuntu and will not work on other distro, you would need to install the driver manualy...
The location of xorg.conf is not same on debian and redhat... etc... sudo implementation is also different... there's just too many differences... not an easy task

366Cobra
Newbie
*
Offline Offline

Activity: 11
Merit: 0


View Profile
November 15, 2017, 09:18:25 PM
 #5631

wow, what a cool project!!

Sorry to barge in like this.  I am only on page 7 so far and am sure the answer to my question is in the next 273 pages Wink

Is there a way to run a script or is there a list of things to install on an existing Ubuntu LTS?
My rig is our media center and file share server, but would like to add a dozen cards or so (asus mining expert) to do some mining, as it is idle most of the time.

Thanks
366Cobra


I think its easier to reformat your existing ubuntu and install nvOC then install and set samba, nfs,... and any thing else you need for your media center instead of going through installing and setting up nvOC over an existing ubuntu.

I think his request seems quite interesting to me.
By developing an installable package on a stable "normal" ubuntu (I say normal to mean that this system would only be installed from the ISO provided by cannonical), Fullzero's scripts and all the others could be spread on much more mining rig.
I admit that it is also another work a little wider and tedious, but in fine, the nvOC package could thus be deployed much more widely and probably also on debian or probably other systems.

He would thus make a big competition to ethOS which makes pay his scripts, even if the first goal is not this one, that would perhaps make them review their commercial policy that personally, I find doubtful.
It would probably also bring other linuxians (called "bearded"!) :-) in some circles ha ha! ) to help this very active community of this thread to further optimize scripts and mining software.

Start with a package including software and scripts adapted for an ubuntu and then chained with a debian more classic and less heavy IMO, and observe if this package could interest the other communities of the other banks of Linux like RED HAT, Fedora and / or Mint ... etc.

Would not it be judicious also to reserve this distribution Ubuntu to the beginners with Linux because it is necessary to recognize this to him, ubuntu tries then a few years to convert the workstations windows to Linux.
In my country, it has done rather well to the national gendarmerie! A civil branch of the police.

I think it would be interesting to put these scripts on a system less heavy volume in one way or another.

I hope that what I am trying to express is understandable to some of those who have read this post.

The idea is nice but not quite practical. There are a lot of differences between linux distros and their backbone so such a project would require quite a big team of developers and testers to execute. Just see what happened few weeks back when ubuntu pushed updates... screwed up the operation on single distro, single version.... imagine if we had 6-7 different distros... even the big software companies don't support more than 3-4 main distrubutions of linux.
Different distros handle libraries, drivers, config files differently, not to mention the selection of preinstalled software... it will be impossible to support that from a community driven free project like this
Yes, I understood what you are saying here. I am well aware of this diversity in Linux distributions. I was just saying that to make a package of a few MB available would be much better than putting an entire system!

For the other systems, those who would like it in the other communities would manage themselves to adapt them to their systems. It was not a question of wanting to control the other branches in a minnning system since this thread or even a dedicated project.

I only think that a simple package would be interesting elsewhere than on ubuntu.

Making an Ubuntu package should not be so different from making a package for Debian. And nothing prevents to continue to put in availability the current file of a whole system.

Finally, I ask myself a question: Would not it be possible to transfer a maximum of things that are not very useful for the mining for the most experienced? Most Linux users pilot their RIGs from another PC via SSH, so it seems to me that the graphics layer does not appear to be essential. This is just an example by others ...

While beginners or inexperienced would become recalcitrant, but nothing prevents to make a package with graphic layer and the other without a graphic layer.

For the graphical drivers pb of two weeks ago, yes, I remember, but Fullzero explained himself about it. he particularly mentioned his desire to keep up to date a certain number of things for safety for example.

In fact, it is always the same: a simple use for beginners and advanced use for "a little" more experienced. This is the problem of simple scripts that some people can not configure for lack of experience. I do not know where FZ0 is in its arbitration of several 1 bash and several 3main according to the various mining scripts provided at the beginning. I understood that he wanted to combine two types of versions: beginners and advanced users.

A package, only a package that would be intallable on a fresh installation of ubuntu (I probably have trouble expressing myself on this because I just wanted to indicate a package uniquemet pure ubuntu at the start, and others do what he wants, that's all). A package with a list of prerequisite tests to install the package.
The comamdne aptitude handles dependencies pretty well if I remember correctly. And even without such an automated installation script, it would be quite simple to list the necessary installation Before uncompressing the scripts and preamble and / or to make a simplified installation guide on a web page.

It's a bit more complicated than that... I am not saying that it can't be done but it's lots of work...

For example, what you call the graphic layer, the X server (or xorg) is essential service as the nvidia drivers will not load without it. So you can't have pure console experience running miner without the X server. On top of X server there are different graphical interfaces like unity (current implementation on nvOC), gnome, kde, etc... all requiring different setup. The base programs that come with one are not installed by default on another. They could be installed but sometimes they don't work well or don't work at all, eg. kde/gnome. A lot of scripts are hardcoded to work with guake which isn't installed by default on kde...
The default nvidia driver installed on nvOC is tweaked for ubuntu and will not work on other distro, you would need to install the driver manualy...
The location of xorg.conf is not same on debian and redhat... etc... sudo implementation is also different... there's just too many differences... not an easy task

Wow, this post really got going Wink

>I think its easier to reformat your existing ubuntu and install nvOC then install and set samba, nfs...
Yeah, no, that is not going to fly.
That would mean that after a new version comes out, I would need to start from scratch.
I do not only run Kodi, but have samba, AFP, raid, VPN sever, multiple VMs, database, ..... - i use this box to develop on as well Wink

Have started downloading the latest version and will see if I can make out what needs installing.
If there is a list of things that need to be installed, so that I can just update parts,then that would be very useful.

The project is not by any chance available publicly, e.g. github, is it?  then i could see by timestamp what has changed and update my rig.
Is there a way to become a contributor?
jmayniac
Jr. Member
*
Offline Offline

Activity: 77
Merit: 0


View Profile
November 15, 2017, 10:27:18 PM
 #5632

Wow, this post really got going Wink

>I think its easier to reformat your existing ubuntu and install nvOC then install and set samba, nfs...
Yeah, no, that is not going to fly.
That would mean that after a new version comes out, I would need to start from scratch.
I do not only run Kodi, but have samba, AFP, raid, VPN sever, multiple VMs, database, ..... - i use this box to develop on as well Wink

Have started downloading the latest version and will see if I can make out what needs installing.
If there is a list of things that need to be installed, so that I can just update parts,then that would be very useful.

The project is not by any chance available publicly, e.g. github, is it?  then i could see by timestamp what has changed and update my rig.
Is there a way to become a contributor?

I started with nvOC and it got very unwieldy quickly.  I didn't need 3/4 of the stuff in there and definitely didn't want Unity and all the services it brings.  I used Ubuntu Server 16.04 and created my own customized version.  I use Openbox and have a couple scripts that run from cron to start the mining and do some overclocking.  I tried to use the Autotemp and Watchdog scripts from nvOC, but they are kind of patched together and don't work too well outside of nvOC.  I'm still looking for a good watchdog script, but for now I managed to cludge something together that sort of works.  I think nvOC is a great idea, but it is getting a little out of control with all the options.  I really like this project: https://github.com/Cyclenerd/ethereum_nvidia_miner but it is geared toward mining Ethereum and I don't mine that.
papampi
Full Member
***
Offline Offline

Activity: 378
Merit: 105


Linux FOREVER! Resistance is futile!!!


View Profile
November 15, 2017, 10:47:46 PM
 #5633

For those who has log size problem
I wrote some thing until we think of a new way either named pipe, tmpfs, ramfs or ...

3main after :

Code:
if [ $CLEAR_LOGS_ON_BOOT == "YES" ]
then
sudo bash '/home/m1/clear_logs'
fi


ADD:

Code:
if [ $LOG_ROTATE == "YES" ]
then
  HCD='/home/m1/log_rotate'
  running=$(ps -ef | awk '$NF~"log_rotate" {print $2}')
  if [ "$running" == "" ]
  then
    guake -n $HCD -r LOG_ROTATE -e "bash /home/m1/log_rotate"
    running=""
  fi
fi

1bash after :

Code:
CLEAR_LOGS_ON_BOOT="NO"         # YES NO

ADD:

Code:
$LOG_ROTATE="YES"
$LOG_ROTATE_INTERVAL=12 # Time between log rotations in hours

And make a new file

Code:
/home/m1/log_rotate


Code:
#!/bin/bash
source /home/m1/1bash

while true
do
  
  TIMEIN=$LOG_ROTATE_INTERVAL
  TIMEOUT=$(($TIMEIN * 3600))
  
  # Rotating wdog logs
  WDOG_LOG_FILE="/home/m1/5_restartlog"
  if [ -e "$WDOG_LOG_FILE" ] ; then
    #Limit the logfile, just keep the last 2k
    echo "$( cat $WDOG_LOG_FILE | tail -n 2k)" > $WDOG_LOG_FILE
  fi
  
  # Rotating wdog alerts log
  WDOG_ALERT_LOG_FILE="/home/m1/7_wdog_alertlog"
  if [ -e "$WDOG_ALERT_LOG_FILE" ] ; then
    #Limit the logfile, just keep the last 2k
    echo "$( cat $WDOG_ALERT_LOG_FILE | tail -n 2k)" > $WDOG_ALERT_LOG_FILE
  fi
  
  # Rotating temp logs
  TEMP_LOG_FILE="/home/m1/6_autotemplog"
  if [ -e "$TEMP_LOG_FILE" ] ; then
    #Limit the logfile, just keep the last 2k
    echo "$( cat $TEMP_LOG_FILE | tail -n 2k)" > $TEMP_LOG_FILE
  fi
  
  # Rotating temp alerts
  TEMP_ALERT_LOG_FILE="/home/m1/7_temp_alertlog"
  if [ -e "$TEMP_ALERT_LOG_FILE" ] ; then
    #Limit the logfile, just keep the last 2k
    echo "$( cat $TEMP_ALERT_LOG_FILE | tail -n 2k)" > $TEMP_ALERT_LOG_FILE
  fi
  
  # Rotating miner screenlog
  MINER_LOG_FILE="/home/m1/screenlog.0"
  if [ -e "$MINER_LOG_FILE" ] ; then
    #Limit the logfile, just keep the last 2k
    echo "$( cat $MINER_LOG_FILE | tail -n 2k)" > $MINER_LOG_FILE
  fi
  
  echo "Rotate again in $TIMEIN Hours"
  
  sleep $TIMEOUT
done


Hope it helps you for now.

kk003
Member
**
Offline Offline

Activity: 115
Merit: 10


View Profile
November 15, 2017, 11:29:09 PM
 #5634


I noticed a commented out pool check from fullzero and remembered he once said he wanted to add it to wdog when a while back one of the pools went down and caused a massive number of users get so many reboots, I myself was one of them, so I thought it could be a good addition to wdog.
And yes there are so many different types of mining configuration in nvOC but I think there is only 2 types of server usage in the miners and what I wrote covers both (server:port or --server --port )

Dont know whats checking if pool is online or not for wdog before restart miner and get to rebooting loop has to do with wtm auto switch though ... seems you are mixing 2 different things together.
I wrote wtm auto switch for my own usage and shared it with the community the same as I done with other stuff and I will keep sharing and dont care if only one person use it or all.

Thanks for your input any way  Wink


This might be a better way to figure out the mining port generically. Assume that at some point, the connection from the miner on nvOC to the mining pool existed and we are trying to detect if the pool is down. If we were to capture the IP and port of this connection ahead of time and store it in a variable, we could then use this information when we detect that the GPU usage is too low (or the miner is no longer running), to determine if it was because the pool is unreachable. Naturally we want to make this both simple and elegant. To that end, take a look at what just simple usage of the netstat command reveals on my test rig:

Code:
m1@Testy:~$ netstat -nptw |grep ESTABLISHED
(Not all processes could be identified, non-owned process info
 will not be shown, you would have to be root to see it all.)
tcp        0      0 192.168.1.178:33432     94.23.199.191:3443      ESTABLISHED 2191/zm
tcp        0    232 192.168.1.178:22        192.168.1.5:52786       ESTABLISHED -
tcp        0      0 192.168.1.178:58320     45.79.223.173:20570     ESTABLISHED 2191/zm
tcp        0      0 192.168.1.178:42000     192.168.1.5:52973       ESTABLISHED 2191/zm

The 2nd one is port 22 (ssh) incoming for my session so that can be ignored. The last one is the telemetry/api of the miner that I have setup (port 42000) so that leaves the 1st and 3rd that we care about. This is further confirmed by the PID/program at the end. I am running DSTM's miner whose executable is zm. So, now if we use a more sophisticated way of finding these connections (requires the installation of gawk), we get:

Code:
m1@Testy:~$ FILTER=$(ss -tn state listening | gawk 'NR > 1 {n=split($3,A,":"); B[NR-1]=A[n]} END {for (i=1; i<length(B); i++) printf ":%s\\s{2}+|", B[i]; printf ":%s\\s{2}+", B[i]}')
m1@Testy:~$ ss -tn state established dst :* | grep -P -v "$FILTER"
Recv-Q Send-Q Local Address:Port               Peer Address:Port
0      0      192.168.1.178:33432              94.23.199.191:3443
0      0      192.168.1.178:58320              45.79.223.173:20570

I am thinking that the first IP/port is for the miner's DEV share and I am certain that the second is our connection to the mining pool (us-east.equihash-hub.miningpoolhub.com) since the destination port (20570) matches what I have configured in 1bash. So, assuming all of this is correct, we can then just use the same check to make sure that we can connect to both pools:

Code:
m1@Testy:~$ nc -vzw1 94.23.199.191 3443
Connection to 94.23.199.191 3443 port [tcp/*] succeeded!

m1@Testy:~$ nc -vzw1 45.79.223.173 20570
Connection to 45.79.223.173 20570 port [tcp/*] succeeded!

So, what is my point? My point is that I think the detection of the mining pool up/down status is a tricky one and therefore I think needs a robust solution which should work in all cases yet be simple enough to just take up a handful of lines of code. I offer the above one such potential solution.

Hope this helps.





I don't use (and never did) wdog at all but I think is a must for everyone using it to make sure that the gpu % util is ok.
That's the point to watch that the pool is up and running.
I've elaborated this other example of how to get the data to make that check. I think is quite "universal" and should work with any miner, so if some of you want to test it that would be good info for developers.

Code:
#! /bin/bash

# Find out miner's name
P_NAME=$(ps aux | grep -v grep| grep SCREEN | grep miner | sed 's/ /\n/g' | grep /home/m1 | rev | cut -d"/" -f1 | rev)
# Find out miner's process number (PID)
P_NUMBER=$(pgrep $P_NAME)
# Find out pool ip and port
IP_POOL=$(sudo lsof -e /run/user/1000/gvfs -Pan -p "$P_NUMBER" -i | grep "$P_NAME" | sed 's/->/ /' | rev | cut -d" " -f2 | rev | cut -d":" -f1)
PORT_POOL=$(sudo lsof -e /run/user/1000/gvfs -Pan -p "$P_NUMBER" -i | grep "$P_NAME" | sed 's/->/ /' | rev | cut -d" " -f2 | rev | cut -d":" -f2)

echo "Miner's name : " $P_NAME
echo "Miner PID    : " $P_NUMBER
echo "Pool's IP    : " $IP_POOL
echo "pool's port  : " $PORT_POOL

Hope that Stubo's idea and this one help devs to consolidate wdog.
hendivalentino
Jr. Member
*
Offline Offline

Activity: 31
Merit: 0


View Profile
November 16, 2017, 12:13:06 AM
 #5635

For those who has log size problem
I wrote some thing until we think of a new way either named pipe, tmpfs, ramfs or ...

3main after :

Code:
if [ $CLEAR_LOGS_ON_BOOT == "YES" ]
then
sudo bash '/home/m1/clear_logs'
fi


ADD:

Code:
if [ $LOG_ROTATE == "YES" ]
then
  HCD='/home/m1/log_rotate'
  running=$(ps -ef | awk '$NF~"log_rotate" {print $2}')
  if [ "$running" == "" ]
  then
    guake -n $HCD -r LOG_ROTATE -e "bash /home/m1/log_rotate"
    running=""
  fi
fi

1bash after :

Code:
CLEAR_LOGS_ON_BOOT="NO"         # YES NO

ADD:

Code:
$LOG_ROTATE="YES"
$LOG_ROTATE_INTERVAL=12 # Time between log rotations in hours

And make a new file

Code:
/home/m1/log_rotate


Code:
#!/bin/bash
source /home/m1/1bash

while true
do
  
  TIMEIN=$LOG_ROTATE_INTERVAL
  TIMEOUT=$(($TIMEIN * 3600))
  
  # Rotating wdog logs
  WDOG_LOG_FILE="/home/m1/5_restartlog"
  if [ -e "$WDOG_LOG_FILE" ] ; then
    #Limit the logfile, just keep the last 2k
    echo "$( cat $WDOG_LOG_FILE | tail -n 2k)" > $WDOG_LOG_FILE
  fi
  
  # Rotating wdog alerts log
  WDOG_ALERT_LOG_FILE="/home/m1/7_wdog_alertlog"
  if [ -e "$WDOG_ALERT_LOG_FILE" ] ; then
    #Limit the logfile, just keep the last 2k
    echo "$( cat $WDOG_ALERT_LOG_FILE | tail -n 2k)" > $WDOG_ALERT_LOG_FILE
  fi
  
  # Rotating temp logs
  TEMP_LOG_FILE="/home/m1/6_autotemplog"
  if [ -e "$TEMP_LOG_FILE" ] ; then
    #Limit the logfile, just keep the last 2k
    echo "$( cat $TEMP_LOG_FILE | tail -n 2k)" > $TEMP_LOG_FILE
  fi
  
  # Rotating temp alerts
  TEMP_ALERT_LOG_FILE="/home/m1/7_temp_alertlog"
  if [ -e "$TEMP_ALERT_LOG_FILE" ] ; then
    #Limit the logfile, just keep the last 2k
    echo "$( cat $TEMP_ALERT_LOG_FILE | tail -n 2k)" > $TEMP_ALERT_LOG_FILE
  fi
  
  # Rotating miner screenlog
  MINER_LOG_FILE="/home/m1/screenlog.0"
  if [ -e "$MINER_LOG_FILE" ] ; then
    #Limit the logfile, just keep the last 2k
    echo "$( cat $MINER_LOG_FILE | tail -n 2k)" > $MINER_LOG_FILE
  fi
  
  echo "Rotate again in $TIMEIN Hours"
  
  sleep $TIMEOUT
done


Hope it helps you for now.

is this necessary for all of us? and how to go to the 3main config? thank yoU!
366Cobra
Newbie
*
Offline Offline

Activity: 11
Merit: 0


View Profile
November 16, 2017, 02:59:47 AM
 #5636

Wow, this post really got going Wink

>I think its easier to reformat your existing ubuntu and install nvOC then install and set samba, nfs...
Yeah, no, that is not going to fly.
That would mean that after a new version comes out, I would need to start from scratch.
I do not only run Kodi, but have samba, AFP, raid, VPN sever, multiple VMs, database, ..... - i use this box to develop on as well Wink

Have started downloading the latest version and will see if I can make out what needs installing.
If there is a list of things that need to be installed, so that I can just update parts,then that would be very useful.

The project is not by any chance available publicly, e.g. github, is it?  then i could see by timestamp what has changed and update my rig.
Is there a way to become a contributor?

I started with nvOC and it got very unwieldy quickly.  I didn't need 3/4 of the stuff in there and definitely didn't want Unity and all the services it brings.  I used Ubuntu Server 16.04 and created my own customized version.  I use Openbox and have a couple scripts that run from cron to start the mining and do some overclocking.  I tried to use the Autotemp and Watchdog scripts from nvOC, but they are kind of patched together and don't work too well outside of nvOC.  I'm still looking for a good watchdog script, but for now I managed to cludge something together that sort of works.  I think nvOC is a great idea, but it is getting a little out of control with all the options.  I really like this project: https://github.com/Cyclenerd/ethereum_nvidia_miner but it is geared toward mining Ethereum and I don't mine that.
I like the versatility - having said that, i have not actually run it yet.  you can choose what you want.

I will try and convert it to a virtual machine.  From memory, you can use QEMU (or was it Xen?) to directly access the hosts hardware.  Have not tried it yet though.
Then I should be able to configure cards on the host and run a script in the virtual to connect cards.........maybe?
bdog1234
Full Member
***
Offline Offline

Activity: 134
Merit: 100


View Profile
November 16, 2017, 03:05:53 AM
 #5637

For those who has log size problem
I wrote some thing until we think of a new way either named pipe, tmpfs, ramfs or ...

3main after :

Code:
if [ $CLEAR_LOGS_ON_BOOT == "YES" ]
then
sudo bash '/home/m1/clear_logs'
fi


ADD:

Code:
if [ $LOG_ROTATE == "YES" ]
then
  HCD='/home/m1/log_rotate'
  running=$(ps -ef | awk '$NF~"log_rotate" {print $2}')
  if [ "$running" == "" ]
  then
    guake -n $HCD -r LOG_ROTATE -e "bash /home/m1/log_rotate"
    running=""
  fi
fi

1bash after :

Code:
CLEAR_LOGS_ON_BOOT="NO"         # YES NO

ADD:

Code:
$LOG_ROTATE="YES"
$LOG_ROTATE_INTERVAL=12 # Time between log rotations in hours

And make a new file

Code:
/home/m1/log_rotate


Code:
#!/bin/bash
source /home/m1/1bash

while true
do
  
  TIMEIN=$LOG_ROTATE_INTERVAL
  TIMEOUT=$(($TIMEIN * 3600))
  
  # Rotating wdog logs
  WDOG_LOG_FILE="/home/m1/5_restartlog"
  if [ -e "$WDOG_LOG_FILE" ] ; then
    #Limit the logfile, just keep the last 2k
    echo "$( cat $WDOG_LOG_FILE | tail -n 2k)" > $WDOG_LOG_FILE
  fi
  
  # Rotating wdog alerts log
  WDOG_ALERT_LOG_FILE="/home/m1/7_wdog_alertlog"
  if [ -e "$WDOG_ALERT_LOG_FILE" ] ; then
    #Limit the logfile, just keep the last 2k
    echo "$( cat $WDOG_ALERT_LOG_FILE | tail -n 2k)" > $WDOG_ALERT_LOG_FILE
  fi
  
  # Rotating temp logs
  TEMP_LOG_FILE="/home/m1/6_autotemplog"
  if [ -e "$TEMP_LOG_FILE" ] ; then
    #Limit the logfile, just keep the last 2k
    echo "$( cat $TEMP_LOG_FILE | tail -n 2k)" > $TEMP_LOG_FILE
  fi
  
  # Rotating temp alerts
  TEMP_ALERT_LOG_FILE="/home/m1/7_temp_alertlog"
  if [ -e "$TEMP_ALERT_LOG_FILE" ] ; then
    #Limit the logfile, just keep the last 2k
    echo "$( cat $TEMP_ALERT_LOG_FILE | tail -n 2k)" > $TEMP_ALERT_LOG_FILE
  fi
  
  # Rotating miner screenlog
  MINER_LOG_FILE="/home/m1/screenlog.0"
  if [ -e "$MINER_LOG_FILE" ] ; then
    #Limit the logfile, just keep the last 2k
    echo "$( cat $MINER_LOG_FILE | tail -n 2k)" > $MINER_LOG_FILE
  fi
  
  echo "Rotate again in $TIMEIN Hours"
  
  sleep $TIMEOUT
done


Hope it helps you for now.

Thank you very much!
papampi
Full Member
***
Offline Offline

Activity: 378
Merit: 105


Linux FOREVER! Resistance is futile!!!


View Profile
November 16, 2017, 07:14:15 AM
 #5638



I don't use (and never did) wdog at all but I think is a must for everyone using it to make sure that the gpu % util is ok.
That's the point to watch that the pool is up and running.
I've elaborated this other example of how to get the data to make that check. I think is quite "universal" and should work with any miner, so if some of you want to test it that would be good info for developers.

Code:
#! /bin/bash

# Find out miner's name
P_NAME=$(ps aux | grep -v grep| grep SCREEN | grep miner | sed 's/ /\n/g' | grep /home/m1 | rev | cut -d"/" -f1 | rev)
# Find out miner's process number (PID)
P_NUMBER=$(pgrep $P_NAME)
# Find out pool ip and port
IP_POOL=$(sudo lsof -e /run/user/1000/gvfs -Pan -p "$P_NUMBER" -i | grep "$P_NAME" | sed 's/->/ /' | rev | cut -d" " -f2 | rev | cut -d":" -f1)
PORT_POOL=$(sudo lsof -e /run/user/1000/gvfs -Pan -p "$P_NUMBER" -i | grep "$P_NAME" | sed 's/->/ /' | rev | cut -d" " -f2 | rev | cut -d":" -f2)

echo "Miner's name : " $P_NAME
echo "Miner PID    : " $P_NUMBER
echo "Pool's IP    : " $IP_POOL
echo "pool's port  : " $PORT_POOL

Hope that Stubo's idea and this one help devs to consolidate wdog.

Thanks a lot mate,
I think your approach is much better than stubo which is based on guessing which one is the server

I am thinking that the first IP/port is for the miner's DEV share and I am certain that the second is our connection to the mining pool (us-east.equihash-hub.miningpoolhub.com) since the destination port (20570) matches what I have configured in 1bash. So, assuming all of this is correct, we can then just use the same check to make sure that we can connect to both pools:

But both needs a stable mining process to be running, and when pool has problem we dont have it
So I cant understand when we have all the details in 1bash why we dont strip it from there with some simple commands.

You see any problems in my approach here :

Code:
# Begin papampi Mod

source /home/m1/1bash

CURRENT_COIN=$(head -n 200 /home/m1/1bash | grep COIN= | sed 's/COIN=//' | sed 's/\"//' | sed 's/\"//')
#echo "$CURRENT_COIN"

CURRENT_COIN_POOL=$(echo {$CURRENT_COIN}_POOL |sed 's/{//' | sed 's/}//' )
#echo $CURRENT_COIN_POOL

POOL_SERVER=$(cat /home/m1/1bash | grep $CURRENT_COIN_POOL | grep -o '".*"' | sed 's/"//'| sed 's/"//')
#echo "$POOL_SERVER"

CURRENT_COIN_PORT=$(echo {$CURRENT_COIN}_PORT | sed 's/{//' | sed 's/}//')
#echo "$CURRENT_COIN_PORT"

if [[ $POOL_SERVER == *stratum* ]]
then
    #echo "stratum"
    PING_SERVER=$( cat /home/m1/1bash | grep $CURRENT_COIN_POOL | grep -o '".*"' | sed 's/"//'| sed 's/"//' | sed 's/stratum+tcp\?:\/\///' | cut -d':' -f1 )
    #echo "Server: $PING_SERVER"
    PING_PORT=$(cat /home/m1/1bash | grep $CURRENT_COIN_POOL | grep -o '".*"' | sed 's/"//'| sed 's/"//' | sed 's/stratum+tcp\?:\/\///' | grep -Eo '[0-9]+$' )
    #echo "Port: $PING_PORT"   

if nc -vzw2 $PING_SERVER $PING_PORT;
    then
        # echo "Strartum Server, INTERNET_IS_GO=1"
        INTERNET_IS_GO=1
    else
        echo "WARNING:  $(date) - Mining Pool Stratum Server is DOWN" | tee -a ${LOG_FILE} ${ALERT_LOG_FILE}
        INTERNET_IS_GO=0
    fi
   
elif [[ $CURRENT_COIN == *DUAL*  || $CURRENT_COIN == *ZPOOL_SKUNK* || $CURRENT_COIN == *SALFTER*  ]]
then
    #echo "Dual mining, check google"
    if nc -vzw2 google.com 443
    then
        # echo "Dual mining, google is up"
        #echo "            INTERNET_IS_GO=1"
        INTERNET_IS_GO=1
    else
        #echo "Dual mining, google is down"
        echo "WARNING:  $(date) - Cant reach google" | tee -a ${LOG_FILE} ${ALERT_LOG_FILE}
        INTERNET_IS_GO=0
    fi
   
else
      PING_SERVER=$( cat /home/m1/1bash | grep $CURRENT_COIN_POOL | grep -o '".*"' | sed 's/"//'| sed 's/"//')
      #echo "Server: $PING_SERVER"
      PING_PORT=$(cat /home/m1/1bash | grep $CURRENT_COIN_PORT | grep -o '".*"' | sed 's/"//' |sed 's/"//')
      #echo "Port: $PING_PORT"
      if nc -vzw1 $PING_SERVER $PING_PORT
    then
        #echo "Not a stratum server,INTERNET_IS_GO=1" | tee -a ${LOG_FILE}
        INTERNET_IS_GO=1
    else
        echo "WARNING:  $(date) - Mining Pool Server is DOWN" | tee -a ${LOG_FILE} ${ALERT_LOG_FILE}
        INTERNET_IS_GO=0
    fi
fi


       # End papampi Mod

papampi
Full Member
***
Offline Offline

Activity: 378
Merit: 105


Linux FOREVER! Resistance is futile!!!


View Profile
November 16, 2017, 07:15:51 AM
 #5639

For those who has log size problem
I wrote some thing until we think of a new way either named pipe, tmpfs, ramfs or ...

3main after :

Code:
if [ $CLEAR_LOGS_ON_BOOT == "YES" ]
then
sudo bash '/home/m1/clear_logs'
fi


ADD:

Code:
if [ $LOG_ROTATE == "YES" ]
then
  HCD='/home/m1/log_rotate'
  running=$(ps -ef | awk '$NF~"log_rotate" {print $2}')
  if [ "$running" == "" ]
  then
    guake -n $HCD -r LOG_ROTATE -e "bash /home/m1/log_rotate"
    running=""
  fi
fi

1bash after :

Code:
CLEAR_LOGS_ON_BOOT="NO"         # YES NO

ADD:

Code:
$LOG_ROTATE="YES"
$LOG_ROTATE_INTERVAL=12 # Time between log rotations in hours

And make a new file

Code:
/home/m1/log_rotate


Code:
#!/bin/bash
source /home/m1/1bash

while true
do
  
  TIMEIN=$LOG_ROTATE_INTERVAL
  TIMEOUT=$(($TIMEIN * 3600))
  
  # Rotating wdog logs
  WDOG_LOG_FILE="/home/m1/5_restartlog"
  if [ -e "$WDOG_LOG_FILE" ] ; then
    #Limit the logfile, just keep the last 2k
    echo "$( cat $WDOG_LOG_FILE | tail -n 2k)" > $WDOG_LOG_FILE
  fi
  
  # Rotating wdog alerts log
  WDOG_ALERT_LOG_FILE="/home/m1/7_wdog_alertlog"
  if [ -e "$WDOG_ALERT_LOG_FILE" ] ; then
    #Limit the logfile, just keep the last 2k
    echo "$( cat $WDOG_ALERT_LOG_FILE | tail -n 2k)" > $WDOG_ALERT_LOG_FILE
  fi
  
  # Rotating temp logs
  TEMP_LOG_FILE="/home/m1/6_autotemplog"
  if [ -e "$TEMP_LOG_FILE" ] ; then
    #Limit the logfile, just keep the last 2k
    echo "$( cat $TEMP_LOG_FILE | tail -n 2k)" > $TEMP_LOG_FILE
  fi
  
  # Rotating temp alerts
  TEMP_ALERT_LOG_FILE="/home/m1/7_temp_alertlog"
  if [ -e "$TEMP_ALERT_LOG_FILE" ] ; then
    #Limit the logfile, just keep the last 2k
    echo "$( cat $TEMP_ALERT_LOG_FILE | tail -n 2k)" > $TEMP_ALERT_LOG_FILE
  fi
  
  # Rotating miner screenlog
  MINER_LOG_FILE="/home/m1/screenlog.0"
  if [ -e "$MINER_LOG_FILE" ] ; then
    #Limit the logfile, just keep the last 2k
    echo "$( cat $MINER_LOG_FILE | tail -n 2k)" > $MINER_LOG_FILE
  fi
  
  echo "Rotate again in $TIMEIN Hours"
  
  sleep $TIMEOUT
done


Hope it helps you for now.

is this necessary for all of us? and how to go to the 3main config? thank yoU!

Not at all if you dont have log size problem
Which I never had and I never seen my log sizes go over 10-15 Mb

wi$em@n
Jr. Member
*
Offline Offline

Activity: 45
Merit: 0


View Profile
November 16, 2017, 07:39:47 AM
 #5640

Can't find info, what is the pass for root? "miner1" doesn't work
Pages: « 1 ... 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 [282] 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 ... 406 »
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!