[Support] lnxd - XMRig


Recommended Posts

Do you know how to enable the http API to check worker status??

 

EDITED: Found it! you can add it as an additional param in "Additional XMRig Arguments" variable, just add:

 

--api-worker-id <your worker name> --http-host 0.0.0.0 --http-port 8888 (example)

 

Also mind to add a port mapping from container to host as it is not done by default

Edited by Koldo
Link to comment
  • 3 weeks later...

Hi,

I'm new to all of this, since there is no webUI, how do I interact with the application?

When I open the console all I have is mine.sh and start.sh, is there a way I can 'connect' to the process that is already running?

Also, i've been looking for optimization tips, how do I enable huge pages and 1GB pages?

I've added

Quote

echo vm.nr_hugepages=$(nproc) >> /etc/sysctl.conf

to the go file, is that the right way to do it?

 

Also, I can't find a config.json file, how do I configure the app?

 

thanks!

Edited by shpitz461
  • Like 1
Link to comment

Im not sure why i never accept any jobs.

Ive been tested for few days that its still the same.

 

* ABOUT XMRig/6.12.1 gcc/9.3.0
* LIBS libuv/1.41.0 OpenSSL/1.1.1j hwloc/2.4.1
* HUGE PAGES supported
* 1GB PAGES disabled
* CPU Intel(R) Xeon(R) CPU E5649 @ 2.53GHz (1) 64-bit AES
L2:1.5 MB L3:12.0 MB 6C/12T NUMA:1
* MEMORY 22.7/23.5 GB (97%)
J2: 4 GB Reserved @ 1333 MHz J2
J3: 4 GB Reserved @ 1333 MHz J3
J4: 4 GB Reserved @ 1333 MHz J4
J5: 4 GB Reserved @ 1333 MHz J5
J6: 4 GB Reserved @ 1333 MHz J6
J7: 4 GB Reserved @ 1333 MHz J7
* MOTHERBOARD LENOVO - Lenovo
* DONATE 1%
* ASSEMBLY intel
* POOL #1 xmr-asia1.nanopool.org:14444 coin monero
* COMMANDS 'h' hashrate, 'p' pause, 'r' resume, 's' results, 'c' connection
* OPENCL disabled
* CUDA 11.2/11.4/6.12.0
* NVML disabled (failed to load NVML)
* CUDA GPU #0 03:00.0 Quadro P400 1252/2005 MHz smx:2 arch:61 mem:1966/1999 MB
[2021-11-21 00:05:39.523] net use pool xmr-asia1.nanopool.org:14444 139.99.101.232
[2021-11-21 00:05:39.523] net new job from xmr-asia1.nanopool.org:14444 diff 480045 algo rx/0 height 2497488
[2021-11-21 00:05:39.523] cpu use argon2 implementation SSSE3
[2021-11-21 00:05:39.524] randomx init dataset algo rx/0 (12 threads) seed d02e1b1704b67497...
[2021-11-21 00:05:39.816] randomx allocated 2336 MB (2080+256) huge pages 100% 1168/1168 +JIT (293 ms)
[2021-11-21 00:05:41.451] net new job from xmr-asia1.nanopool.org:14444 diff 480045 algo rx/0 height 2497488
[2021-11-21 00:05:45.186] randomx dataset ready (5369 ms)
[2021-11-21 00:05:45.186] cpu use profile rx (6 threads) scratchpad 2048 KB
[2021-11-21 00:05:45.186] nvidia use profile rx (1 thread) scratchpad 2048 KB
| # | GPU | BUS ID | INTENSITY | THREADS | BLOCKS | BF | BS | MEMORY | NAME
| 0 | 0 | 03:00.0 | 128 | 32 | 4 | 0 | 0 | 256 | Quadro P400
[2021-11-21 00:05:45.200] cpu READY threads 6/6 (6) huge pages 100% 6/6 memory 12288 KB (15 ms)
[2021-11-21 00:05:45.186] randomx dataset ready (5369 ms)
[2021-11-21 00:05:45.186] cpu use profile rx (6 threads) scratchpad 2048 KB
[2021-11-21 00:05:45.186] nvidia use profile rx (1 thread) scratchpad 2048 KB
| # | GPU | BUS ID | INTENSITY | THREADS | BLOCKS | BF | BS | MEMORY | NAME
| 0 | 0 | 03:00.0 | 128 | 32 | 4 | 0 | 0 | 256 | Quadro P400
[2021-11-21 00:05:45.200] cpu READY threads 6/6 (6) huge pages 100% 6/6 memory 12288 KB (15 ms)
[2021-11-21 00:05:46.030] nvidia READY threads 1/1 (843 ms)
[2021-11-21 00:06:41.723] net new job from xmr-asia1.nanopool.org:14444 diff 480045 algo rx/0 height 2497488
[2021-11-21 00:06:41.723] net new job from xmr-asia1.nanopool.org:14444 diff 480045 algo rx/0 height 2497488
[2021-11-21 00:06:45.232] nvidia #0 03:00.0 0W 0C
[2021-11-21 00:06:45.232] miner speed 10s/60s/15m 1398.9 n/a n/a H/s max 1411.8 H/s
[2021-11-21 00:07:45.272] nvidia #0 03:00.0 0W 0C
[2021-11-21 00:07:45.272] miner speed 10s/60s/15m 1386.3 1373.5 n/a H/s max 1411.8 H/s
[2021-11-21 00:07:45.631] net new job from xmr-asia1.nanopool.org:14444 diff 480045 algo rx/0 height 2497488
[2021-11-21 00:08:45.311] nvidia #0 03:00.0 0W 0C
[2021-11-21 00:08:45.311] miner speed 10s/60s/15m 1395.3 1394.6 n/a H/s max 1411.8 H/s
[2021-11-21 00:08:45.311] nvidia #0 03:00.0 0W 0C
[2021-11-21 00:08:45.311] miner speed 10s/60s/15m 1395.3 1394.6 n/a H/s max 1411.8 H/s
[2021-11-21 00:08:46.105] net new job from xmr-asia1.nanopool.org:14444 diff 480045 algo rx/0 height 2497488
[2021-11-21 00:08:51.526] net new job from xmr-asia1.nanopool.org:14444 diff 480045 algo rx/0 height 2497489
[2021-11-21 00:08:51.526] net new job from xmr-asia1.nanopool.org:14444 diff 480045 algo rx/0 height 2497489
[2021-11-21 00:09:45.357] nvidia #0 03:00.0 0W 0C
[2021-11-21 00:09:45.357] miner speed 10s/60s/15m 1400.6 1402.0 n/a H/s max 1411.8 H/s
[2021-11-21 00:09:52.659] net new job from xmr-asia1.nanopool.org:14444 diff 480045 algo rx/0 height 2497489
[2021-11-21 00:09:52.659] net new job from xmr-asia1.nanopool.org:14444 diff 480045 algo rx/0 height 2497489
[2021-11-21 00:10:19.253] net no active pools, stop mining
[2021-11-21 00:10:24.608] net use pool xmr-asia1.nanopool.org:14444 139.99.102.74
[2021-11-21 00:10:24.608] net new job from xmr-asia1.nanopool.org:14444 diff 480045 algo rx/0 height 2497490
[2021-11-21 00:10:45.409] nvidia #0 03:00.0 0W 0C
[2021-11-21 00:10:45.409] miner speed 10s/60s/15m 1402.9 1260.3 n/a H/s max 1411.8 H/s
[2021-11-21 00:11:11.737] net new job from xmr-asia1.nanopool.org:14444 diff 480045 algo rx/0 height 2497490
[2021-11-21 00:11:45.462] nvidia #0 03:00.0 0W 0C
[2021-11-21 00:11:45.462] miner speed 10s/60s/15m 1404.3 1382.1 n/a H/s max 1411.8 H/s
[2021-11-21 00:12:12.768] net new job from xmr-asia1.nanopool.org:14444 diff 480045 algo rx/0 height 2497490
[2021-11-21 00:12:45.512] nvidia #0 03:00.0 0W 0C
[2021-11-21 00:12:45.512] miner speed 10s/60s/15m 1396.7 1397.5 n/a H/s max 1411.8 H/s
[2021-11-21 00:13:14.011] net new job from xmr-asia1.nanopool.org:14444 diff 480045 algo rx/0 height 2497490
[2021-11-21 00:13:14.011] net new job from xmr-asia1.nanopool.org:14444 diff 480045 algo rx/0 height 2497490
[2021-11-21 00:13:45.566] nvidia #0 03:00.0 0W 0C
[2021-11-21 00:13:45.566] miner speed 10s/60s/15m 1394.6 1397.4 n/a H/s max 1411.8 H/s
[2021-11-21 00:14:12.857] net new job from xmr-asia1.nanopool.org:14444 diff 480045 algo rx/0 height 2497490
[2021-11-21 00:14:45.621] nvidia #0 03:00.0 0W 0C
[2021-11-21 00:14:45.621] miner speed 10s/60s/15m 1390.1 1397.5 n/a H/s max 1411.8 H/s
[2021-11-21 00:14:46.850] net new job from xmr-asia1.nanopool.org:14444 diff 480045 algo rx/0 height 2497491
[2021-11-21 00:15:09.065] net new job from xmr-asia1.nanopool.org:14444 diff 480045 algo rx/0 height 2497492
[2021-11-21 00:15:09.982] net new job from xmr-asia1.nanopool.org:14444 diff 480045 algo rx/0 height 2497493
[2021-11-21 00:15:45.679] nvidia #0 03:00.0 0W 0C
[2021-11-21 00:15:45.679] miner speed 10s/60s/15m 1389.8 1400.4 n/a H/s max 1416.4 H/s
[2021-11-21 00:16:00.322] net new job from xmr-asia1.nanopool.org:14444 diff 480045 algo rx/0 height 2497494
[2021-11-21 00:16:42.072] net new job from xmr-asia1.nanopool.org:14444 diff 480045 algo rx/0 height 2497495
[2021-11-21 00:16:45.738] nvidia #0 03:00.0 0W 0C
[2021-11-21 00:16:45.738] miner speed 10s/60s/15m 1393.4 1402.8 n/a H/s max 1416.4 H/s
[2021-11-21 00:17:42.379] net new job from xmr-asia1.nanopool.org:14444 diff 480045 algo rx/0 height 2497495
[2021-11-21 00:17:45.805] nvidia #0 03:00.0 0W 0C
[2021-11-21 00:17:45.805] miner speed 10s/60s/15m 1377.2 1386.6 n/a H/s max 1416.4 H/s
[2021-11-21 00:18:43.510] net new job from xmr-asia1.nanopool.org:14444 diff 480045 algo rx/0 height 2497495
[2021-11-21 00:18:45.864] nvidia #0 03:00.0 0W 0C
[2021-11-21 00:18:45.865] miner speed 10s/60s/15m 1385.3 1397.8 n/a H/s max 1416.4 H/s

Link to comment
  • 2 weeks later...

Hey everyone, sorry for my long absence. As I mentioned on my PhoenixMiner thread, I've had a lot of things going on and not enough free time. If I've missed any important posts please feel free to reply to this again and I'll revisit. 

 

On 12/8/2021 at 4:55 AM, daemon_of_chaos said:

Do you plan to release an update for the latest XMrig version (currently v6.16.2)?

I do plan on it assuming it's compatible and not a massive amount of work. Problem is I've forgotten the password for my build VM which is where I stored all my build files, and they're not backed up of course. I'm going to have to make another VM and mount the image over there to get them out. Time is still a massive issue for me, so this will likely happen over the next few days to weeks as I get back on top of things. 

 

On 12/1/2021 at 5:47 AM, mdrodge said:

Any plans to add Raptoreum as an option?

(at the moment i'm running a VM to do this but it would be sweet to run this in a container)

Had never heard of this until now haha. See my reply to @daemon_of_chaos above though. I think the latest update introduces support for it so yeah, it's probably coming down the line. 

 

On 11/10/2021 at 7:03 AM, shpitz461 said:

Also, is it possible for you to create a container for this one?

 

https://github.com/Bendr0id/xmrigCC

If you still want this let me know, it shouldn't be a massive amount of work to add it to this container as it's just an xmrig fork, but for simplicity's sake I wouldn't have the three different dev fee options for it.

 

On 11/8/2021 at 12:19 PM, shpitz461 said:

I'm new to all of this, since there is no webUI, how do I interact with the application?

Check out the container logs to get updates, etc. I usually look at the graphs generated by the pool I'm mining to in order to monitor progress as they're way prettier and have come a long way, but you *can* view the docker logs over http / ssh, or access the API directly as @Koldo has provided steps for above.

 

While the binary is interactive in that you can watch the output and use keyboard commands to exert very basic control over it, as you found it's usually controlled by a config file. This container doesn't rely on that config file though, it uses variables which can be set in the edit container page. Your question was so long ago though that I'm assuming you worked it out shortly after posting.

 

It is possible and quite easy to get an interactive session from this container and have it running over SSH in terminal. I used it for testing while I was developing this, but it goes slightly against the way docker was integrated into Unraid so I designed the container to rely on the environment variables instead. 

Edited by lnxd
  • Like 2
Link to comment
On 12/10/2021 at 1:13 AM, lnxd said:

If you still want this let me know, it shouldn't be a massive amount of work to add it to this container as it's just an xmrig fork, but for simplicity's sake I wouldn't have the three different dev fee options for it.

That would be great since I'm only running the cpu portion. the CC fork also says that api is built-in, would be nice to interact with the miner via API.

Thanks!

Link to comment
  • 2 weeks later...

How would i limit the miner to only about 20% of each core ? or run only when the cpu core is idle?

affinity settings work , but it loads the chosen cores 100% , and i would like it to mine only when cores arent used

--cpu-priority=0 doesnt do anything , changing the value from 0 to anything up to 5 doesnt matter , it always loads the same cores to 100%

Edited by Xcage
Link to comment

I dont know what I am doing wrong but I can not get the docker to install I am getting the following.

 

root@localhost:# /usr/local/emhttp/plugins/dynamix.docker.manager/scripts/docker run -d --name='XMRig' --net='bridge' --cpuset-cpus='1,2,3,4,5,7,8,9,10,11' -e TZ="America/Los_Angeles" -e HOST_OS="Unraid" -e 'POOL'='gulf.moneroocean:10128' -e 'WALLET'='XXXXXXXXXXXXXXXXXXXXX' -e 'WORKER'='Unraid' -e 'ADDITIONAL'='--no-color ' -e 'DONATE'='1' -e 'FEE'='lnxd-fee' -e 'COIN'='monero' -e 'DRIVERV'='' -e 'NVIDIA_VISIBLE_DEVICES'='' -e 'NVIDIA_DRIVER_CAPABILITIES'='all' --device='' 'lnxd/xmrig:latest'

docker: bad format for path: .
See 'docker run --help'.

 

Link to comment

You've got an empty device in the template.  Remove it.

--device=''

 

Quote

Container Device:
*Important* You can remove this if you don't want to use GPU passthrough from host to container. Set it to '/dev/dri:/dev/dri' if you want to use your GPU. This Isn't necessary if privileged mode is enabled, but won't hurt to have it enabled anyway.

What this means to to actually hit the remove button, not simply blank it out

Link to comment
  • 3 weeks later...
On 4/1/2021 at 9:50 PM, lnxd said:

Overview: Support thread for lnxd/XMRig in CA.

Application: XMRig - https://github.com/xmrig/xmrig

Docker Hub: https://hub.docker.com/r/lnxd/xmrig

GitHub: https://github.com/lnxd/docker-xmrig

 

Please ensure that you know what you're doing before setting this up, as excessively high temperatures are BAD for computers and could damage your hardware / eventuate in data loss.

 

Instructions:

  1. Install lnxd's XMRig via CA.
  2. Add in your XMR receive address to the wallet field.
  3. Update the pool address to your closest node or preferred pool. Don't forget to pay attention to the port if you change pools, as they tend to use arbitrary ports.
  4. Set the --donate-level you would like to enable. Eg. entering a 1 causes XMRig to mine for 99 minutes for you, and then 1 minute for the fee option chosen in the next step. Setting the --donate-level flag to 0 will not work unless you follow the steps below.
  5. There are 3 fee options enabled by a custom build from my fork of the latest release source. This allows for some options that aren't available in the base version:
    no-fee: Makes it possible to set the --donate-level flag to 0%. Unless you set it to 0%, the fee goes to the developer of XMRig.
    dev-fee: The fee goes to the developer of XMRig.
    lnxd-fee: The fee goes to me 🙃 Thank you in advance if you choose this option.

  6. Turn on advanced mode for the template and select CPU core / thread pairs that you would like to use in CPU pinning. I recommend leaving core 1 and its thread pair unselected, as it could possibly cause Unraid to unexpectedly slow down / the Docker engine to quit if things get too intense while mining.
    670055416_ScreenShot2021-04-02at8_45_23am.png.87bc01e297840fadd32bdf36489369eb.png
  7. Run the container and check the temperature of your CPU and other hardware regularly for at least 20-30 minutes to ensure everything is safe and stable. If you get any errors that you can't decipher, feel free reach out and I'll take a look for you.
  8. (Optional) To increase your hash rate, you can add and run the following User Script. At the moment, in order to reset your MSR values to default you need to restart your Unraid host. For this reason, it needs to be re-run after every boot as the updated values do not survive reboots. The script installs msr-tools and then updates the registry values to optimise your CPU for XMRig. This may have performance implications for other functions on your server. The logs will also show that XMRig is being run with MSR MOD disabled, but if you run this script it serves the same purpose and you should get a higher hash rate.
    #!/bin/bash
    
    # Write XMRig Optimised MSR values
    # https://github.com/xmrig/xmrig/blob/master/scripts/randomx_boost.sh
    
    VERSION=1.3
    
    echo "Installing msr-tools v${VERSION}"
    echo ""
    echo "(don't!) blame lnxd if something goes wrong"
    echo ""
    curl -fsSL https://packages.slackonly.com/pub/packages/14.2-x86_64/system/msr-tools/msr-tools-${VERSION}-x86_64-1_slonly.txz -o /tmp/msr-tools-${VERSION}-x86_64-1_slonly.txz
    upgradepkg --install-new /tmp/msr-tools-${VERSION}-x86_64-1_slonly.txz
    rm /tmp/msr-tools-${VERSION}-x86_64-1_slonly.txz
    
    echo ""
    echo "Optimising register values for XMRig"
    echo ""
    modprobe msr
    
    if cat /proc/cpuinfo | grep "AMD Ryzen" >/dev/null; then
    	if cat /proc/cpuinfo | grep "cpu family[[:space:]]:[[:space:]]25" >/dev/null; then
    		echo "Detected Ryzen (Zen3)"
    		wrmsr -a 0xc0011020 0x4480000000000
    		wrmsr -a 0xc0011021 0x1c000200000040
    		wrmsr -a 0xc0011022 0xc000000401500000
    		wrmsr -a 0xc001102b 0x2000cc14
    		echo "MSR register values for Ryzen (Zen3) applied"
    	else
    		echo "Detected Ryzen (Zen1/Zen2)"
    		wrmsr -a 0xc0011020 0
    		wrmsr -a 0xc0011021 0x40
    		wrmsr -a 0xc0011022 0x1510000
    		wrmsr -a 0xc001102b 0x2000cc16
    		echo "MSR register values for Ryzen (Zen1/Zen2) applied"
    	fi
    elif cat /proc/cpuinfo | grep "Intel" >/dev/null; then
    	echo "Detected Intel"
    	wrmsr -a 0x1a4 0xf
    	echo "MSR register values for Intel applied"
    else
    	echo "No supported CPU detected"
    fi
    echo ""
    echo "Done!"
    echo "To reset values, please reboot your server."

     


If you get stuck, please feel free to reply to this thread and I'll do my best to help out 🙂

How do I stop / get past the error message:

"Execution error

Server error"

When starting the container?

 

I must have configured something wrong but I have never seen that message before. I cannot even see any entries in the log file.

Edited by Richard J
grammatical edit
Link to comment
18 minutes ago, Richard J said:

How do I stop / get past the error message:

"Execution error

Server error"

When starting the container?

 

I must have configured something wrong but I have never seen that message before. I cannot even see any entries in the log file.

I enabled privileged mode and it verks!

Link to comment
  • 2 weeks later...
On 12/10/2021 at 7:13 AM, lnxd said:

Had never heard of this until now haha. See my reply to @daemon_of_chaos above though. I think the latest update introduces support for it so yeah, it's probably coming down the line.

Hi, big thanks for the image! I'm new to both docker and linux altogether but still managed to run it on an OMV media server with good results.

I did fail though on trying to launch RTM mining by tinkering with additional arguments. Am I correct to think that the current release does not support RTM? Do you foresee an implementation?

Link to comment
  • 1 month later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.