You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@iotdb.apache.org by "ope-nz (via GitHub)" <gi...@apache.org> on 2023/09/01 01:21:38 UTC
[GitHub] [iotdb] ope-nz opened a new issue, #11014: [Feature request] remove dependency on wmic & wsh from windows batch files
ope-nz opened a new issue, #11014:
URL: https://github.com/apache/iotdb/issues/11014
### Search before asking
- [X] I searched in the [issues](https://github.com/apache/iotdb/issues) and found nothing similar.
### Motivation
Hello team, I am building an installer for IotDB so that I can distribte IotDB with a solution I develop. The installer deploys IotDB as a windows service.
During my testing I have discovered that;
1. The env scripts are using wmic which is deprecated and is an optional feature on Windows 10/11 (https://learn.microsoft.com/en-us/windows/whats-new/deprecated-features)
2. The env script are using WSH which is not desirable. Windows Scripting host is blocked on many customer sites and is not good practise on Windows.
To add to this, I am testing in the Windows 11 Sandbox which does not allow you to enable the wmic feature anyway so IotDB would never start successfully.
To work around this I have developed a small C# console app to return the number of cores and memory in megabytes
https://github.com/ope-nz/IotDBHWInfo
In the env batch files I have replaced the cores/memory determination with these lines;
for /f %%A in ('..\tools\IotDBHWInfo.exe -cores') do set "system_cpu_cores=%%A"
echo CORES %system_cpu_cores%
for /f %%A in ('..\tools\IotDBHWInfo.exe -memory') do set "system_memory_in_mb=%%A"
echo SYSTEM MEMORY %system_memory_in_mb%
### Solution
Develop alternate solution to using wmic/wsh such as console app show above
### Alternatives
Use https://github.com/ope-nz/IotDBHWInfo
Update env batch files with
for /f %%A in ('..\tools\IotDBHWInfo.exe -cores') do set "system_cpu_cores=%%A"
echo CORES %system_cpu_cores%
for /f %%A in ('..\tools\IotDBHWInfo.exe -memory') do set "system_memory_in_mb=%%A"
echo SYSTEM MEMORY %system_memory_in_mb%
### Are you willing to submit a PR?
- [X] I'm willing to submit a PR!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [iotdb] HTHou commented on issue #11014: [Feature request] remove dependency on wmic & wsh from windows batch files
Posted by "HTHou (via GitHub)" <gi...@apache.org>.
HTHou commented on issue #11014:
URL: https://github.com/apache/iotdb/issues/11014#issuecomment-1702096700
Looking forward your PR!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [iotdb] ope-nz commented on issue #11014: [Feature request] remove dependency on wmic & wsh from windows batch files
Posted by "ope-nz (via GitHub)" <gi...@apache.org>.
ope-nz commented on issue #11014:
URL: https://github.com/apache/iotdb/issues/11014#issuecomment-1704843313
@HTHou I think I need write access to make a pull request. What is the process to request access?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [iotdb] HTHou commented on issue #11014: [Feature request] remove dependency on wmic & wsh from windows batch files
Posted by "HTHou (via GitHub)" <gi...@apache.org>.
HTHou commented on issue #11014:
URL: https://github.com/apache/iotdb/issues/11014#issuecomment-1705867657
Hi @ope-nz, you don't need that, you can follow this guide to make a code contribution. https://iotdb.apache.org/Development/HowToCommit.html
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org