├── .gitignore ├── LICENSE ├── README.md └── dell_fans_controller ├── Dell └── SysMgt │ └── bmc │ ├── DSM_BMU_SOLProxy32.exe │ ├── cygcrypto-0.9.8.dll │ ├── cyggcc_s-1.dll │ ├── cygwin1.dll │ ├── cygz.dll │ ├── dcwipm32.dll │ ├── ipmish.exe │ ├── ipmitool.exe │ ├── readme.txt │ └── solproxy.cfg ├── dell_fans_controller.sln └── dell_fans_controller ├── FormMain.Designer.cs ├── FormMain.cs ├── FormMain.resx ├── IniHelper.cs ├── Program.cs ├── Properties ├── AssemblyInfo.cs ├── Resources.Designer.cs ├── Resources.resx ├── Settings.Designer.cs └── Settings.settings ├── dell.ico └── dell_fans_controller.csproj /.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | ## 4 | ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore 5 | 6 | # User-specific files 7 | *.rsuser 8 | *.suo 9 | *.user 10 | *.userosscache 11 | *.sln.docstates 12 | 13 | # User-specific files (MonoDevelop/Xamarin Studio) 14 | *.userprefs 15 | 16 | # Mono auto generated files 17 | mono_crash.* 18 | 19 | # Build results 20 | [Dd]ebug/ 21 | [Dd]ebugPublic/ 22 | [Rr]elease/ 23 | [Rr]eleases/ 24 | x64/ 25 | x86/ 26 | [Aa][Rr][Mm]/ 27 | [Aa][Rr][Mm]64/ 28 | bld/ 29 | [Bb]in/ 30 | [Oo]bj/ 31 | [Ll]og/ 32 | [Ll]ogs/ 33 | 34 | # Visual Studio 2015/2017 cache/options directory 35 | .vs/ 36 | # Uncomment if you have tasks that create the project's static files in wwwroot 37 | #wwwroot/ 38 | 39 | # Visual Studio 2017 auto generated files 40 | Generated\ Files/ 41 | 42 | # MSTest test Results 43 | [Tt]est[Rr]esult*/ 44 | [Bb]uild[Ll]og.* 45 | 46 | # NUnit 47 | *.VisualState.xml 48 | TestResult.xml 49 | nunit-*.xml 50 | 51 | # Build Results of an ATL Project 52 | [Dd]ebugPS/ 53 | [Rr]eleasePS/ 54 | dlldata.c 55 | 56 | # Benchmark Results 57 | BenchmarkDotNet.Artifacts/ 58 | 59 | # .NET Core 60 | project.lock.json 61 | project.fragment.lock.json 62 | artifacts/ 63 | 64 | # StyleCop 65 | StyleCopReport.xml 66 | 67 | # Files built by Visual Studio 68 | *_i.c 69 | *_p.c 70 | *_h.h 71 | *.ilk 72 | *.meta 73 | *.obj 74 | *.iobj 75 | *.pch 76 | *.pdb 77 | *.ipdb 78 | *.pgc 79 | *.pgd 80 | *.rsp 81 | *.sbr 82 | *.tlb 83 | *.tli 84 | *.tlh 85 | *.tmp 86 | *.tmp_proj 87 | *_wpftmp.csproj 88 | *.log 89 | *.vspscc 90 | *.vssscc 91 | .builds 92 | *.pidb 93 | *.svclog 94 | *.scc 95 | 96 | # Chutzpah Test files 97 | _Chutzpah* 98 | 99 | # Visual C++ cache files 100 | ipch/ 101 | *.aps 102 | *.ncb 103 | *.opendb 104 | *.opensdf 105 | *.sdf 106 | *.cachefile 107 | *.VC.db 108 | *.VC.VC.opendb 109 | 110 | # Visual Studio profiler 111 | *.psess 112 | *.vsp 113 | *.vspx 114 | *.sap 115 | 116 | # Visual Studio Trace Files 117 | *.e2e 118 | 119 | # TFS 2012 Local Workspace 120 | $tf/ 121 | 122 | # Guidance Automation Toolkit 123 | *.gpState 124 | 125 | # ReSharper is a .NET coding add-in 126 | _ReSharper*/ 127 | *.[Rr]e[Ss]harper 128 | *.DotSettings.user 129 | 130 | # TeamCity is a build add-in 131 | _TeamCity* 132 | 133 | # DotCover is a Code Coverage Tool 134 | *.dotCover 135 | 136 | # AxoCover is a Code Coverage Tool 137 | .axoCover/* 138 | !.axoCover/settings.json 139 | 140 | # Visual Studio code coverage results 141 | *.coverage 142 | *.coveragexml 143 | 144 | # NCrunch 145 | _NCrunch_* 146 | .*crunch*.local.xml 147 | nCrunchTemp_* 148 | 149 | # MightyMoose 150 | *.mm.* 151 | AutoTest.Net/ 152 | 153 | # Web workbench (sass) 154 | .sass-cache/ 155 | 156 | # Installshield output folder 157 | [Ee]xpress/ 158 | 159 | # DocProject is a documentation generator add-in 160 | DocProject/buildhelp/ 161 | DocProject/Help/*.HxT 162 | DocProject/Help/*.HxC 163 | DocProject/Help/*.hhc 164 | DocProject/Help/*.hhk 165 | DocProject/Help/*.hhp 166 | DocProject/Help/Html2 167 | DocProject/Help/html 168 | 169 | # Click-Once directory 170 | publish/ 171 | 172 | # Publish Web Output 173 | *.[Pp]ublish.xml 174 | *.azurePubxml 175 | # Note: Comment the next line if you want to checkin your web deploy settings, 176 | # but database connection strings (with potential passwords) will be unencrypted 177 | *.pubxml 178 | *.publishproj 179 | 180 | # Microsoft Azure Web App publish settings. Comment the next line if you want to 181 | # checkin your Azure Web App publish settings, but sensitive information contained 182 | # in these scripts will be unencrypted 183 | PublishScripts/ 184 | 185 | # NuGet Packages 186 | *.nupkg 187 | # NuGet Symbol Packages 188 | *.snupkg 189 | # The packages folder can be ignored because of Package Restore 190 | **/[Pp]ackages/* 191 | # except build/, which is used as an MSBuild target. 192 | !**/[Pp]ackages/build/ 193 | # Uncomment if necessary however generally it will be regenerated when needed 194 | #!**/[Pp]ackages/repositories.config 195 | # NuGet v3's project.json files produces more ignorable files 196 | *.nuget.props 197 | *.nuget.targets 198 | 199 | # Microsoft Azure Build Output 200 | csx/ 201 | *.build.csdef 202 | 203 | # Microsoft Azure Emulator 204 | ecf/ 205 | rcf/ 206 | 207 | # Windows Store app package directories and files 208 | AppPackages/ 209 | BundleArtifacts/ 210 | Package.StoreAssociation.xml 211 | _pkginfo.txt 212 | *.appx 213 | *.appxbundle 214 | *.appxupload 215 | 216 | # Visual Studio cache files 217 | # files ending in .cache can be ignored 218 | *.[Cc]ache 219 | # but keep track of directories ending in .cache 220 | !?*.[Cc]ache/ 221 | 222 | # Others 223 | ClientBin/ 224 | ~$* 225 | *~ 226 | *.dbmdl 227 | *.dbproj.schemaview 228 | *.jfm 229 | *.pfx 230 | *.publishsettings 231 | orleans.codegen.cs 232 | 233 | # Including strong name files can present a security risk 234 | # (https://github.com/github/gitignore/pull/2483#issue-259490424) 235 | #*.snk 236 | 237 | # Since there are multiple workflows, uncomment next line to ignore bower_components 238 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) 239 | #bower_components/ 240 | 241 | # RIA/Silverlight projects 242 | Generated_Code/ 243 | 244 | # Backup & report files from converting an old project file 245 | # to a newer Visual Studio version. Backup files are not needed, 246 | # because we have git ;-) 247 | _UpgradeReport_Files/ 248 | Backup*/ 249 | UpgradeLog*.XML 250 | UpgradeLog*.htm 251 | ServiceFabricBackup/ 252 | *.rptproj.bak 253 | 254 | # SQL Server files 255 | *.mdf 256 | *.ldf 257 | *.ndf 258 | 259 | # Business Intelligence projects 260 | *.rdl.data 261 | *.bim.layout 262 | *.bim_*.settings 263 | *.rptproj.rsuser 264 | *- [Bb]ackup.rdl 265 | *- [Bb]ackup ([0-9]).rdl 266 | *- [Bb]ackup ([0-9][0-9]).rdl 267 | 268 | # Microsoft Fakes 269 | FakesAssemblies/ 270 | 271 | # GhostDoc plugin setting file 272 | *.GhostDoc.xml 273 | 274 | # Node.js Tools for Visual Studio 275 | .ntvs_analysis.dat 276 | node_modules/ 277 | 278 | # Visual Studio 6 build log 279 | *.plg 280 | 281 | # Visual Studio 6 workspace options file 282 | *.opt 283 | 284 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.) 285 | *.vbw 286 | 287 | # Visual Studio LightSwitch build output 288 | **/*.HTMLClient/GeneratedArtifacts 289 | **/*.DesktopClient/GeneratedArtifacts 290 | **/*.DesktopClient/ModelManifest.xml 291 | **/*.Server/GeneratedArtifacts 292 | **/*.Server/ModelManifest.xml 293 | _Pvt_Extensions 294 | 295 | # Paket dependency manager 296 | .paket/paket.exe 297 | paket-files/ 298 | 299 | # FAKE - F# Make 300 | .fake/ 301 | 302 | # CodeRush personal settings 303 | .cr/personal 304 | 305 | # Python Tools for Visual Studio (PTVS) 306 | __pycache__/ 307 | *.pyc 308 | 309 | # Cake - Uncomment if you are using it 310 | # tools/** 311 | # !tools/packages.config 312 | 313 | # Tabs Studio 314 | *.tss 315 | 316 | # Telerik's JustMock configuration file 317 | *.jmconfig 318 | 319 | # BizTalk build output 320 | *.btp.cs 321 | *.btm.cs 322 | *.odx.cs 323 | *.xsd.cs 324 | 325 | # OpenCover UI analysis results 326 | OpenCover/ 327 | 328 | # Azure Stream Analytics local run output 329 | ASALocalRun/ 330 | 331 | # MSBuild Binary and Structured Log 332 | *.binlog 333 | 334 | # NVidia Nsight GPU debugger configuration file 335 | *.nvuser 336 | 337 | # MFractors (Xamarin productivity tool) working folder 338 | .mfractor/ 339 | 340 | # Local History for Visual Studio 341 | .localhistory/ 342 | 343 | # BeatPulse healthcheck temp database 344 | healthchecksdb 345 | 346 | # Backup folder for Package Reference Convert tool in Visual Studio 2017 347 | MigrationBackup/ 348 | 349 | # Ionide (cross platform F# VS Code tools) working folder 350 | .ionide/ 351 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright [yyyy] [name of copyright owner] 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Dell EMC Server Fans PWM Controller 2 | ================== 3 | 4 | a tool for dell server fans speed control
5 | 6 | ### Build 7 | 1. Visual Studio 2019.
8 | 2. Windows 10.
9 | 3. .Net Framework.
10 | 11 | ### Run 12 | 1. 注意,放置可执行文件的路径不能含有中文和特殊字符.
13 | 2. 主要不要把风扇调的太慢,可能会导致过热.
-------------------------------------------------------------------------------- /dell_fans_controller/Dell/SysMgt/bmc/DSM_BMU_SOLProxy32.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jiafeng5513/dell_fans_controller/8532d997c4dbe5c03ec22dfedd1533258ea4266c/dell_fans_controller/Dell/SysMgt/bmc/DSM_BMU_SOLProxy32.exe -------------------------------------------------------------------------------- /dell_fans_controller/Dell/SysMgt/bmc/cygcrypto-0.9.8.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jiafeng5513/dell_fans_controller/8532d997c4dbe5c03ec22dfedd1533258ea4266c/dell_fans_controller/Dell/SysMgt/bmc/cygcrypto-0.9.8.dll -------------------------------------------------------------------------------- /dell_fans_controller/Dell/SysMgt/bmc/cyggcc_s-1.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jiafeng5513/dell_fans_controller/8532d997c4dbe5c03ec22dfedd1533258ea4266c/dell_fans_controller/Dell/SysMgt/bmc/cyggcc_s-1.dll -------------------------------------------------------------------------------- /dell_fans_controller/Dell/SysMgt/bmc/cygwin1.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jiafeng5513/dell_fans_controller/8532d997c4dbe5c03ec22dfedd1533258ea4266c/dell_fans_controller/Dell/SysMgt/bmc/cygwin1.dll -------------------------------------------------------------------------------- /dell_fans_controller/Dell/SysMgt/bmc/cygz.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jiafeng5513/dell_fans_controller/8532d997c4dbe5c03ec22dfedd1533258ea4266c/dell_fans_controller/Dell/SysMgt/bmc/cygz.dll -------------------------------------------------------------------------------- /dell_fans_controller/Dell/SysMgt/bmc/dcwipm32.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jiafeng5513/dell_fans_controller/8532d997c4dbe5c03ec22dfedd1533258ea4266c/dell_fans_controller/Dell/SysMgt/bmc/dcwipm32.dll -------------------------------------------------------------------------------- /dell_fans_controller/Dell/SysMgt/bmc/ipmish.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jiafeng5513/dell_fans_controller/8532d997c4dbe5c03ec22dfedd1533258ea4266c/dell_fans_controller/Dell/SysMgt/bmc/ipmish.exe -------------------------------------------------------------------------------- /dell_fans_controller/Dell/SysMgt/bmc/ipmitool.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jiafeng5513/dell_fans_controller/8532d997c4dbe5c03ec22dfedd1533258ea4266c/dell_fans_controller/Dell/SysMgt/bmc/ipmitool.exe -------------------------------------------------------------------------------- /dell_fans_controller/Dell/SysMgt/bmc/readme.txt: -------------------------------------------------------------------------------- 1 | THIRD PARTY LICENSE FILE 2 | 3 | Contents: 4 | 5 | A) SHA1 6 | B) OpenSSL 7 | C) ACE(tm) 8 | D) LibTomCrypt 9 | 10 | 11 | 12 | ***************************************************************************** 13 | A) The following software may be included in this product: RFC 3174 - US 14 | Secure Hash Algorithm 1 (SHA1). Use of any of this software is governed by 15 | terms of the license below: 16 | ***************************************************************************** 17 | 18 | Full Copyright Statement 19 | 20 | Copyright (c) The Internet Society (2001). All Rights Reserved. 21 | 22 | This document and translations of it may be copied and furnished to others, 23 | and derivative works that comment on or otherwise explain it or assist in its 24 | implementation may be prepared, copied, published and distributed, in whole 25 | or in part, without restriction of any kind, provided that the above 26 | copyright notice and this paragraph are included on all such copies and 27 | derivative works. However, this document itself may not be modified in any 28 | way, such as by removing the copyright notice or references to the Internet 29 | Society or other Internet organizations, except as needed for the purpose of 30 | developing Internet standards in which case the procedures for copyrights 31 | defined in the Internet Standards process must be followed, or as required to 32 | translate it into languages other than English. 33 | 34 | The limited permissions granted above are perpetual and will not be revoked 35 | by the Internet Society or its successors or assigns. 36 | 37 | This document and the information contained herein is provided on an "AS IS" 38 | basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING TASK FORCE 39 | DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO 40 | ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY 41 | RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A 42 | PARTICULAR PURPOSE. 43 | 44 | 45 | 46 | ***************************************************************************** 47 | B) The following software may be included in this product: OpenSSL. Use of 48 | any of this software is governed by terms of the license below: 49 | ***************************************************************************** 50 | 51 | The OpenSSL toolkit stays under a dual license, i.e. both the conditions of 52 | the OpenSSL License and the original SSLeay license apply to the toolkit. 53 | See below for the actual license texts. Actually both licenses are BSD-style 54 | Open Source licenses. In case of any license issues related to OpenSSL please 55 | contact openssl-core@openssl.org. 56 | 57 | OpenSSL License 58 | ==================================================================== 59 | Copyright (c) 1998-2005 The OpenSSL Project. All rights reserved. 60 | 61 | Redistribution and use in source and binary forms, with or without 62 | modification, are permitted provided that the following conditions are met: 63 | 64 | 1. Redistributions of source code must retain the above copyright notice, 65 | this list of conditions and the following disclaimer. 66 | 67 | 2. Redistributions in binary form must reproduce the above copyright notice, 68 | this list of conditions and the following disclaimer in the documentation 69 | and/or other materials provided with the distribution. 70 | 71 | 3. All advertising materials mentioning features or use of this software must 72 | display the following acknowledgment: "This product includes software 73 | developed by the OpenSSL Project for use in the OpenSSL Toolkit. 74 | (http://www.openssl.org/)" 75 | 76 | 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to 77 | endorse or promote products derived from this software without prior written 78 | permission. For written permission, please contact openssl-core@openssl.org. 79 | 80 | 5. Products derived from this software may not be called "OpenSSL" nor may 81 | "OpenSSL" appear in their names without prior written permission of the 82 | OpenSSL Project. 83 | 84 | 6. Redistributions of any form whatsoever must retain the following 85 | acknowledgment: "This product includes software developed by the OpenSSL 86 | Project for use in the OpenSSL Toolkit (http://www.openssl.org/)" 87 | 88 | THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY EXPRESSED 89 | OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 90 | OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN 91 | NO EVENT SHALL THE OpenSSL PROJECT OR ITS CONTRIBUTORS BE LIABLE FOR ANY 92 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 93 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 94 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 95 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 96 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 97 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 98 | ==================================================================== 99 | 100 | This product includes cryptographic software written by Eric Young 101 | (eay@cryptsoft.com). This product includes software written by Tim Hudson 102 | (tjh@cryptsoft.com). 103 | 104 | Original SSLeay License 105 | ----------------------- 106 | 107 | Copyright (c) 1995-1998 Eric Young (eay@cryptsoft.com) 108 | All rights reserved. 109 | 110 | This package is an SSL implementation written by Eric Young 111 | (eay@cryptsoft.com). The implementation was written so as to conform with 112 | Netscapes SSL. 113 | 114 | This library is free for commercial and non-commercial use as long as the 115 | following conditions are adhered to. The following conditions apply to all 116 | code found in this distribution, be it the RC4, RSA, lhash, DES, etc., code; 117 | not just the SSL code. The SSL documentation included with this distribution 118 | is covered by the same copyright terms except that the holder is Tim Hudson 119 | (tjh@cryptsoft.com). 120 | 121 | Copyright remains Eric Young's, and as such any Copyright notices in the code 122 | are not to be removed. If this package is used in a product, Eric Young 123 | should be given attribution as the author of the parts of the library used. 124 | This can be in the form of a textual message at program startup or in 125 | documentation (online or textual) provided with the package. 126 | 127 | Redistribution and use in source and binary forms, with or without 128 | modification, are permitted provided that the following conditions are met: 129 | 130 | 1. Redistributions of source code must retain the copyright notice, this list 131 | of conditions and the following disclaimer. 132 | 133 | 2. Redistributions in binary form must reproduce the above copyright notice, 134 | this list of conditions and the following disclaimer in the documentation 135 | and/or other materials provided with the distribution. 136 | 137 | 3. All advertising materials mentioning features or use of this software must 138 | display the following acknowledgement: "This product includes cryptographic 139 | software written by Eric Young (eay@cryptsoft.com)" The word 'cryptographic' 140 | can be left out if the routines from the library being used are not 141 | cryptographic related :-). 142 | 143 | 4. If you include any Windows specific code (or a derivative thereof) from 144 | the apps directory (application code) you must include an acknowledgement: 145 | "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" 146 | 147 | THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND ANY EXPRESS OR IMPLIED 148 | WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 149 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO 150 | EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 151 | INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 152 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 153 | OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 154 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 155 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 156 | EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 157 | 158 | The license and distribution terms for any publicly available version or 159 | derivative of this code cannot be changed. i.e. this code cannot simply be 160 | copied and put under another distribution license [including the GNU Public 161 | License.] 162 | 163 | 164 | 165 | ***************************************************************************** 166 | C) The following software may be included in this product: ACE(tm). Use of any 167 | of this software is governed by terms of the license below: 168 | ***************************************************************************** 169 | 170 | Copyright and Licensing Information for ACE(TM), TAO(TM), CIAO(TM), and CoSMIC(TM) 171 | ACE(TM), TAO(TM), CIAO(TM), and CoSMIC(TM) (henceforth referred to as "DOC 172 | software") are copyrighted by Douglas C. Schmidt and his research group at 173 | Washington University, University of California, Irvine, and Vanderbilt 174 | University, Copyright (c) 1993-2005, all rights reserved. Since DOC software is 175 | open-source, freely available software, you are free to use, modify, copy, 176 | and distribute--perpetually and irrevocably--the DOC software source code and 177 | object code produced from the source, as well as copy and distribute modified 178 | versions of this software. You must, however, include this copyright 179 | statement along with code built using DOC software. 180 | You can use DOC software in commercial and/or binary software releases and 181 | are under no obligation to redistribute any of your source code that is built 182 | using DOC software. Note, however, that you may not do anything to the DOC 183 | software code, such as copyrighting it yourself or claiming authorship of the 184 | DOC software code, that will prevent DOC software from being distributed 185 | freely using an open-source development model. You needn't inform anyone that 186 | you're using DOC software in your software, though we encourage you to let us 187 | know so we can promote your project in the DOC software success stories. 188 | The ACE, TAO, CIAO, and CoSMIC web sites are maintained by the DOC Group at 189 | the Institute for Software Integrated Systems (ISIS) and the Center for 190 | Distributed Object Computing of Washington University, St. Louis for the 191 | development of open-source software as part of the open-source software 192 | community. By submitting comments, suggestions, code, code snippets, 193 | techniques (including that of usage) and algorithms (collectively 194 | ``Submissions''), submitters acknowledge that they have the right to do so, 195 | that any such Submissions are given freely and unreservedly, and that they 196 | waive any claims to copyright or ownership. In addition, submitters 197 | acknowledge that any such Submission might become part of the copyright 198 | maintained on the overall body of code that comprises the DOC software. By 199 | making a Submission, submitter agrees to these terms. Moreover, submitters 200 | acknowledge that the incorporation or modification of such Submissions is 201 | entirely at the discretion of the moderators of the open-source DOC software 202 | projects or their designees. 203 | Submissions are provided by the submitter ``as is'' with no warranties 204 | whatsoever, including any warranty of merchantability, noninfringement of 205 | third party intellectual property, or fitness for any particular purpose. In 206 | no event shall the submitter be liable for any direct, indirect, special, 207 | exemplary, punitive, or consequential damages, including without limitation, 208 | lost profits, even if advised of the possibility of such damages. Likewise, 209 | DOC software is provided as is with no warranties of any kind, including the 210 | warranties of design, merchantability, and fitness for a particular purpose, 211 | noninfringement, or arising from a course of dealing, usage or trade 212 | practice. Washington University, UC Irvine, Vanderbilt University, their 213 | employees, and students shall have no liability with respect to the 214 | infringement of copyrights, trade secrets or any patents by DOC software or 215 | any part thereof. Moreover, in no event will Washington University, UC 216 | Irvine, or Vanderbilt University, their employees, or students be liable for 217 | any lost revenue or profits or other special, indirect and consequential 218 | damages. 219 | DOC software is provided with no support and without any obligation on the 220 | part of Washington University, UC Irvine, Vanderbilt University, their 221 | employees, or students to assist in its use, correction, modification, or 222 | enhancement. A number of companies around the world provide commercial 223 | support for DOC software, however. DOC software is Y2K-compliant, as long as 224 | the underlying OS platform is Y2K-compliant. 225 | The names ACE(TM), TAO(TM), CIAO(TM), CoSMIC(TM), Washington University, UC Irvine, 226 | and Vanderbilt University, may not be used to endorse or promote products or 227 | services derived from this source without express written permission from 228 | Washington University, UC Irvine, or Vanderbilt University. Further, products 229 | or services derived from this source may not be called ACE(TM), TAO(TM), CIAO(TM), 230 | or CoSMIC(TM) nor may the name Washington University, UC Irvine, or Vanderbilt 231 | University appear in their names, without express written permission from 232 | Washington University, UC Irvine, and Vanderbilt University. 233 | 234 | 235 | 236 | ***************************************************************************** 237 | D) The following software may be included in this product: LibTomCrypt, 238 | Author: Tom St. Denis. Use of any of this software is licensed under 239 | PublicDomain. For more information, please visit http://libtomcrypt.org/. 240 | ***************************************************************************** 241 | 242 | Copyright and Licensing Information for LibTomCrypt 243 | LibTomCrypt is a fairly comprehensive, modular and portable cryptographic 244 | toolkit that provides developers with a vast array of well known published 245 | block ciphers, one-way hash functions, chaining modes, pseudo-random number 246 | generators, public key cryptography and a plethora of other routines. 247 | LibTomCrypt has been designed from the ground up to be very simple to use. It 248 | has a modular and standard API that allows new ciphers, hashes and PRNGs to 249 | be added or removed without change to the overall end application. It 250 | features easy to use functions and a complete user manual which has many 251 | source snippet examples. 252 | LibTomCrypt is free for all purposes under the public domain. This includes 253 | commercial use, redistribution and even branching. 254 | -------------------------------------------------------------------------------- /dell_fans_controller/Dell/SysMgt/bmc/solproxy.cfg: -------------------------------------------------------------------------------- 1 | [parameter] 2 | ip=INADDR_ANY 3 | port=623 4 | session_timeout=30 5 | power_off_timeout=50 6 | #debug=off 7 | #logpath=. 8 | #sdrcache=enable 9 | #sdrcache_path=. 10 | #sol_loss_silent=0 11 | #sol_loss_threshold=10 12 | #set_boot_option=auto 13 | #retry_count=10 14 | #retry_interval=2 15 | #user_interface=command 16 | #max_session=1 17 | #local_authentication=remote 18 | -------------------------------------------------------------------------------- /dell_fans_controller/dell_fans_controller.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 16 4 | VisualStudioVersion = 16.0.29709.97 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "dell_fans_controller", "dell_fans_controller\dell_fans_controller.csproj", "{01F9EA05-3303-4446-8E37-7B43C28238DC}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {01F9EA05-3303-4446-8E37-7B43C28238DC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {01F9EA05-3303-4446-8E37-7B43C28238DC}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {01F9EA05-3303-4446-8E37-7B43C28238DC}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {01F9EA05-3303-4446-8E37-7B43C28238DC}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | GlobalSection(ExtensibilityGlobals) = postSolution 23 | SolutionGuid = {40800FCE-106D-4C48-A549-E3CF823099A6} 24 | EndGlobalSection 25 | EndGlobal 26 | -------------------------------------------------------------------------------- /dell_fans_controller/dell_fans_controller/FormMain.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace dell_fans_controller 2 | { 3 | partial class frmMain 4 | { 5 | /// 6 | /// 必需的设计器变量。 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// 清理所有正在使用的资源。 12 | /// 13 | /// 如果应释放托管资源,为 true;否则为 false。 14 | protected override void Dispose(bool disposing) 15 | { 16 | if (disposing && (components != null)) 17 | { 18 | components.Dispose(); 19 | } 20 | base.Dispose(disposing); 21 | } 22 | 23 | #region Windows 窗体设计器生成的代码 24 | 25 | /// 26 | /// 设计器支持所需的方法 - 不要修改 27 | /// 使用代码编辑器修改此方法的内容。 28 | /// 29 | private void InitializeComponent() 30 | { 31 | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmMain)); 32 | this.grpMain = new System.Windows.Forms.GroupBox(); 33 | this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); 34 | this.lblIp = new System.Windows.Forms.Label(); 35 | this.btnVisitDellService = new System.Windows.Forms.Button(); 36 | this.txtPassword = new System.Windows.Forms.TextBox(); 37 | this.lblPassword = new System.Windows.Forms.Label(); 38 | this.txtIp = new System.Windows.Forms.TextBox(); 39 | this.lblUser = new System.Windows.Forms.Label(); 40 | this.txtUser = new System.Windows.Forms.TextBox(); 41 | this.trkBarSpeed = new System.Windows.Forms.TrackBar(); 42 | this.btnReset = new System.Windows.Forms.Button(); 43 | this.btnSet = new System.Windows.Forms.Button(); 44 | this.nbrUpDownSpeed = new System.Windows.Forms.NumericUpDown(); 45 | this.lstViewSensor = new System.Windows.Forms.ListView(); 46 | this.colKey = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); 47 | this.colValue = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); 48 | this.colUnit = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); 49 | this.colStatus = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); 50 | this.colFaultThresholdMin = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); 51 | this.colWarningThresholdMin = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); 52 | this.colWarningThresholdMax = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); 53 | this.colFaultThresholdMax = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); 54 | this.nbrUpDownAutoRefresh = new System.Windows.Forms.NumericUpDown(); 55 | this.lblAutoRefresh = new System.Windows.Forms.Label(); 56 | this.label3 = new System.Windows.Forms.Label(); 57 | this.btnRefreshNow = new System.Windows.Forms.Button(); 58 | this.groupBox1 = new System.Windows.Forms.GroupBox(); 59 | this.groupBox2 = new System.Windows.Forms.GroupBox(); 60 | this.background_FetchStates = new System.ComponentModel.BackgroundWorker(); 61 | this.progressBar = new System.Windows.Forms.ProgressBar(); 62 | this.about_button = new System.Windows.Forms.Button(); 63 | this.grpMain.SuspendLayout(); 64 | this.tableLayoutPanel1.SuspendLayout(); 65 | ((System.ComponentModel.ISupportInitialize)(this.trkBarSpeed)).BeginInit(); 66 | ((System.ComponentModel.ISupportInitialize)(this.nbrUpDownSpeed)).BeginInit(); 67 | ((System.ComponentModel.ISupportInitialize)(this.nbrUpDownAutoRefresh)).BeginInit(); 68 | this.groupBox1.SuspendLayout(); 69 | this.groupBox2.SuspendLayout(); 70 | this.SuspendLayout(); 71 | // 72 | // grpMain 73 | // 74 | this.grpMain.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 75 | | System.Windows.Forms.AnchorStyles.Right))); 76 | this.grpMain.Controls.Add(this.tableLayoutPanel1); 77 | this.grpMain.Location = new System.Drawing.Point(12, 12); 78 | this.grpMain.Name = "grpMain"; 79 | this.grpMain.Size = new System.Drawing.Size(862, 63); 80 | this.grpMain.TabIndex = 1; 81 | this.grpMain.TabStop = false; 82 | this.grpMain.Text = "iDRAC"; 83 | // 84 | // tableLayoutPanel1 85 | // 86 | this.tableLayoutPanel1.ColumnCount = 8; 87 | this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); 88 | this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); 89 | this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); 90 | this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); 91 | this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); 92 | this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); 93 | this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); 94 | this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20F)); 95 | this.tableLayoutPanel1.Controls.Add(this.about_button, 7, 0); 96 | this.tableLayoutPanel1.Controls.Add(this.lblIp, 0, 0); 97 | this.tableLayoutPanel1.Controls.Add(this.btnVisitDellService, 6, 0); 98 | this.tableLayoutPanel1.Controls.Add(this.txtPassword, 5, 0); 99 | this.tableLayoutPanel1.Controls.Add(this.lblPassword, 4, 0); 100 | this.tableLayoutPanel1.Controls.Add(this.txtIp, 1, 0); 101 | this.tableLayoutPanel1.Controls.Add(this.lblUser, 2, 0); 102 | this.tableLayoutPanel1.Controls.Add(this.txtUser, 3, 0); 103 | this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill; 104 | this.tableLayoutPanel1.Location = new System.Drawing.Point(3, 17); 105 | this.tableLayoutPanel1.Name = "tableLayoutPanel1"; 106 | this.tableLayoutPanel1.RowCount = 1; 107 | this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); 108 | this.tableLayoutPanel1.Size = new System.Drawing.Size(856, 43); 109 | this.tableLayoutPanel1.TabIndex = 12; 110 | // 111 | // lblIp 112 | // 113 | this.lblIp.AutoSize = true; 114 | this.lblIp.Location = new System.Drawing.Point(3, 0); 115 | this.lblIp.Name = "lblIp"; 116 | this.lblIp.Size = new System.Drawing.Size(17, 12); 117 | this.lblIp.TabIndex = 6; 118 | this.lblIp.Text = "IP"; 119 | // 120 | // btnVisitDellService 121 | // 122 | this.btnVisitDellService.Location = new System.Drawing.Point(438, 3); 123 | this.btnVisitDellService.Name = "btnVisitDellService"; 124 | this.btnVisitDellService.Size = new System.Drawing.Size(213, 27); 125 | this.btnVisitDellService.TabIndex = 7; 126 | this.btnVisitDellService.Text = "Visit Dell iDRAC WEB Console"; 127 | this.btnVisitDellService.UseVisualStyleBackColor = true; 128 | this.btnVisitDellService.Click += new System.EventHandler(this.btnVisitDellService_Click); 129 | // 130 | // txtPassword 131 | // 132 | this.txtPassword.Location = new System.Drawing.Point(332, 3); 133 | this.txtPassword.Name = "txtPassword"; 134 | this.txtPassword.PasswordChar = '*'; 135 | this.txtPassword.Size = new System.Drawing.Size(100, 21); 136 | this.txtPassword.TabIndex = 10; 137 | this.txtPassword.Text = "root"; 138 | this.txtPassword.LostFocus += new System.EventHandler(this.TxtPassword_LostFocus); 139 | // 140 | // lblPassword 141 | // 142 | this.lblPassword.AutoSize = true; 143 | this.lblPassword.Location = new System.Drawing.Point(273, 0); 144 | this.lblPassword.Name = "lblPassword"; 145 | this.lblPassword.Size = new System.Drawing.Size(53, 12); 146 | this.lblPassword.TabIndex = 11; 147 | this.lblPassword.Text = "Password"; 148 | // 149 | // txtIp 150 | // 151 | this.txtIp.Location = new System.Drawing.Point(26, 3); 152 | this.txtIp.Name = "txtIp"; 153 | this.txtIp.Size = new System.Drawing.Size(100, 21); 154 | this.txtIp.TabIndex = 5; 155 | this.txtIp.Text = "192.168.0.1"; 156 | this.txtIp.LostFocus += new System.EventHandler(this.TxtIp_LostFocus); 157 | // 158 | // lblUser 159 | // 160 | this.lblUser.AutoSize = true; 161 | this.lblUser.Location = new System.Drawing.Point(132, 0); 162 | this.lblUser.Name = "lblUser"; 163 | this.lblUser.Size = new System.Drawing.Size(29, 12); 164 | this.lblUser.TabIndex = 9; 165 | this.lblUser.Text = "User"; 166 | // 167 | // txtUser 168 | // 169 | this.txtUser.Location = new System.Drawing.Point(167, 3); 170 | this.txtUser.Name = "txtUser"; 171 | this.txtUser.Size = new System.Drawing.Size(100, 21); 172 | this.txtUser.TabIndex = 8; 173 | this.txtUser.Text = "root"; 174 | this.txtUser.LostFocus += new System.EventHandler(this.TxtUser_LostFocus); 175 | // 176 | // trkBarSpeed 177 | // 178 | this.trkBarSpeed.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 179 | | System.Windows.Forms.AnchorStyles.Right))); 180 | this.trkBarSpeed.Location = new System.Drawing.Point(70, 20); 181 | this.trkBarSpeed.Maximum = 100; 182 | this.trkBarSpeed.Name = "trkBarSpeed"; 183 | this.trkBarSpeed.Size = new System.Drawing.Size(785, 45); 184 | this.trkBarSpeed.TabIndex = 4; 185 | this.trkBarSpeed.Scroll += new System.EventHandler(this.trkBarSpeed_Scroll); 186 | // 187 | // btnReset 188 | // 189 | this.btnReset.Location = new System.Drawing.Point(155, 71); 190 | this.btnReset.Name = "btnReset"; 191 | this.btnReset.Size = new System.Drawing.Size(131, 22); 192 | this.btnReset.TabIndex = 3; 193 | this.btnReset.Text = "Reset to Auto Mode"; 194 | this.btnReset.UseVisualStyleBackColor = true; 195 | this.btnReset.Click += new System.EventHandler(this.btnReset_Click); 196 | // 197 | // btnSet 198 | // 199 | this.btnSet.Location = new System.Drawing.Point(9, 71); 200 | this.btnSet.Name = "btnSet"; 201 | this.btnSet.Size = new System.Drawing.Size(131, 22); 202 | this.btnSet.TabIndex = 2; 203 | this.btnSet.Text = "Set Speed"; 204 | this.btnSet.UseVisualStyleBackColor = true; 205 | this.btnSet.Click += new System.EventHandler(this.btnSet_Click); 206 | // 207 | // nbrUpDownSpeed 208 | // 209 | this.nbrUpDownSpeed.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; 210 | this.nbrUpDownSpeed.Location = new System.Drawing.Point(9, 20); 211 | this.nbrUpDownSpeed.Name = "nbrUpDownSpeed"; 212 | this.nbrUpDownSpeed.Size = new System.Drawing.Size(55, 21); 213 | this.nbrUpDownSpeed.TabIndex = 1; 214 | this.nbrUpDownSpeed.ValueChanged += new System.EventHandler(this.nbrUpDownSpeed_ValueChanged); 215 | // 216 | // lstViewSensor 217 | // 218 | this.lstViewSensor.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 219 | | System.Windows.Forms.AnchorStyles.Left) 220 | | System.Windows.Forms.AnchorStyles.Right))); 221 | this.lstViewSensor.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { 222 | this.colKey, 223 | this.colValue, 224 | this.colUnit, 225 | this.colStatus, 226 | this.colFaultThresholdMin, 227 | this.colWarningThresholdMin, 228 | this.colWarningThresholdMax, 229 | this.colFaultThresholdMax}); 230 | this.lstViewSensor.FullRowSelect = true; 231 | this.lstViewSensor.GridLines = true; 232 | this.lstViewSensor.HideSelection = false; 233 | this.lstViewSensor.Location = new System.Drawing.Point(6, 42); 234 | this.lstViewSensor.Name = "lstViewSensor"; 235 | this.lstViewSensor.Size = new System.Drawing.Size(848, 488); 236 | this.lstViewSensor.TabIndex = 7; 237 | this.lstViewSensor.UseCompatibleStateImageBehavior = false; 238 | this.lstViewSensor.View = System.Windows.Forms.View.Details; 239 | // 240 | // colKey 241 | // 242 | this.colKey.Text = "探测器"; 243 | this.colKey.Width = 120; 244 | // 245 | // colValue 246 | // 247 | this.colValue.Text = "读数"; 248 | this.colValue.Width = 100; 249 | // 250 | // colUnit 251 | // 252 | this.colUnit.Text = "单位"; 253 | this.colUnit.Width = 100; 254 | // 255 | // colStatus 256 | // 257 | this.colStatus.Text = "状态"; 258 | // 259 | // colFaultThresholdMin 260 | // 261 | this.colFaultThresholdMin.Text = "Fault下限"; 262 | this.colFaultThresholdMin.Width = 78; 263 | // 264 | // colWarningThresholdMin 265 | // 266 | this.colWarningThresholdMin.Text = "警告下限"; 267 | this.colWarningThresholdMin.Width = 79; 268 | // 269 | // colWarningThresholdMax 270 | // 271 | this.colWarningThresholdMax.Text = "警告上限"; 272 | this.colWarningThresholdMax.Width = 80; 273 | // 274 | // colFaultThresholdMax 275 | // 276 | this.colFaultThresholdMax.Text = "Fault上限"; 277 | this.colFaultThresholdMax.Width = 74; 278 | // 279 | // nbrUpDownAutoRefresh 280 | // 281 | this.nbrUpDownAutoRefresh.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; 282 | this.nbrUpDownAutoRefresh.Location = new System.Drawing.Point(230, 17); 283 | this.nbrUpDownAutoRefresh.Name = "nbrUpDownAutoRefresh"; 284 | this.nbrUpDownAutoRefresh.Size = new System.Drawing.Size(50, 21); 285 | this.nbrUpDownAutoRefresh.TabIndex = 12; 286 | this.nbrUpDownAutoRefresh.Tag = " TODO: by cw1997 2020-06-24 22:58:37"; 287 | this.nbrUpDownAutoRefresh.Value = new decimal(new int[] { 288 | 20, 289 | 0, 290 | 0, 291 | 0}); 292 | this.nbrUpDownAutoRefresh.Visible = false; 293 | // 294 | // lblAutoRefresh 295 | // 296 | this.lblAutoRefresh.AutoSize = true; 297 | this.lblAutoRefresh.Location = new System.Drawing.Point(111, 19); 298 | this.lblAutoRefresh.Name = "lblAutoRefresh"; 299 | this.lblAutoRefresh.Size = new System.Drawing.Size(113, 12); 300 | this.lblAutoRefresh.TabIndex = 12; 301 | this.lblAutoRefresh.Text = "Auto Refresh Delay"; 302 | this.lblAutoRefresh.Visible = false; 303 | // 304 | // label3 305 | // 306 | this.label3.AutoSize = true; 307 | this.label3.Location = new System.Drawing.Point(286, 24); 308 | this.label3.Name = "label3"; 309 | this.label3.Size = new System.Drawing.Size(53, 12); 310 | this.label3.TabIndex = 13; 311 | this.label3.Text = "(second)"; 312 | this.label3.Visible = false; 313 | // 314 | // btnRefreshNow 315 | // 316 | this.btnRefreshNow.Location = new System.Drawing.Point(6, 15); 317 | this.btnRefreshNow.Name = "btnRefreshNow"; 318 | this.btnRefreshNow.Size = new System.Drawing.Size(99, 21); 319 | this.btnRefreshNow.TabIndex = 12; 320 | this.btnRefreshNow.Text = "Refresh Now"; 321 | this.btnRefreshNow.UseVisualStyleBackColor = true; 322 | this.btnRefreshNow.Click += new System.EventHandler(this.btnRefreshNow_Click); 323 | // 324 | // groupBox1 325 | // 326 | this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 327 | | System.Windows.Forms.AnchorStyles.Right))); 328 | this.groupBox1.Controls.Add(this.trkBarSpeed); 329 | this.groupBox1.Controls.Add(this.nbrUpDownSpeed); 330 | this.groupBox1.Controls.Add(this.btnSet); 331 | this.groupBox1.Controls.Add(this.btnReset); 332 | this.groupBox1.Location = new System.Drawing.Point(12, 81); 333 | this.groupBox1.Name = "groupBox1"; 334 | this.groupBox1.Size = new System.Drawing.Size(862, 101); 335 | this.groupBox1.TabIndex = 14; 336 | this.groupBox1.TabStop = false; 337 | this.groupBox1.Text = "Fans Speed Control"; 338 | // 339 | // groupBox2 340 | // 341 | this.groupBox2.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 342 | | System.Windows.Forms.AnchorStyles.Left) 343 | | System.Windows.Forms.AnchorStyles.Right))); 344 | this.groupBox2.Controls.Add(this.progressBar); 345 | this.groupBox2.Controls.Add(this.btnRefreshNow); 346 | this.groupBox2.Controls.Add(this.lstViewSensor); 347 | this.groupBox2.Controls.Add(this.nbrUpDownAutoRefresh); 348 | this.groupBox2.Controls.Add(this.label3); 349 | this.groupBox2.Controls.Add(this.lblAutoRefresh); 350 | this.groupBox2.Location = new System.Drawing.Point(13, 188); 351 | this.groupBox2.Name = "groupBox2"; 352 | this.groupBox2.Size = new System.Drawing.Size(861, 536); 353 | this.groupBox2.TabIndex = 15; 354 | this.groupBox2.TabStop = false; 355 | this.groupBox2.Text = "States"; 356 | // 357 | // background_FetchStates 358 | // 359 | this.background_FetchStates.WorkerReportsProgress = true; 360 | this.background_FetchStates.DoWork += new System.ComponentModel.DoWorkEventHandler(this.background_FetchStates_DoWork); 361 | this.background_FetchStates.ProgressChanged += new System.ComponentModel.ProgressChangedEventHandler(this.background_FetchStates_ProgressChanged); 362 | // 363 | // progressBar 364 | // 365 | this.progressBar.Location = new System.Drawing.Point(542, 17); 366 | this.progressBar.Name = "progressBar"; 367 | this.progressBar.Size = new System.Drawing.Size(312, 23); 368 | this.progressBar.Style = System.Windows.Forms.ProgressBarStyle.Marquee; 369 | this.progressBar.TabIndex = 24; 370 | // 371 | // about_button 372 | // 373 | this.about_button.Location = new System.Drawing.Point(657, 3); 374 | this.about_button.Name = "about_button"; 375 | this.about_button.Size = new System.Drawing.Size(91, 27); 376 | this.about_button.TabIndex = 13; 377 | this.about_button.Text = "About"; 378 | this.about_button.UseVisualStyleBackColor = true; 379 | this.about_button.Click += new System.EventHandler(this.about_button_Click); 380 | // 381 | // frmMain 382 | // 383 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); 384 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 385 | this.ClientSize = new System.Drawing.Size(886, 736); 386 | this.Controls.Add(this.groupBox2); 387 | this.Controls.Add(this.groupBox1); 388 | this.Controls.Add(this.grpMain); 389 | this.HelpButton = true; 390 | this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); 391 | this.MaximizeBox = false; 392 | this.Name = "frmMain"; 393 | this.Text = "Dell Fans Speed Controller"; 394 | this.Load += new System.EventHandler(this.frmMain_Load); 395 | this.grpMain.ResumeLayout(false); 396 | this.tableLayoutPanel1.ResumeLayout(false); 397 | this.tableLayoutPanel1.PerformLayout(); 398 | ((System.ComponentModel.ISupportInitialize)(this.trkBarSpeed)).EndInit(); 399 | ((System.ComponentModel.ISupportInitialize)(this.nbrUpDownSpeed)).EndInit(); 400 | ((System.ComponentModel.ISupportInitialize)(this.nbrUpDownAutoRefresh)).EndInit(); 401 | this.groupBox1.ResumeLayout(false); 402 | this.groupBox1.PerformLayout(); 403 | this.groupBox2.ResumeLayout(false); 404 | this.groupBox2.PerformLayout(); 405 | this.ResumeLayout(false); 406 | 407 | } 408 | 409 | #endregion 410 | private System.Windows.Forms.GroupBox grpMain; 411 | private System.Windows.Forms.TrackBar trkBarSpeed; 412 | private System.Windows.Forms.Button btnReset; 413 | private System.Windows.Forms.Button btnSet; 414 | private System.Windows.Forms.NumericUpDown nbrUpDownSpeed; 415 | private System.Windows.Forms.Button btnVisitDellService; 416 | private System.Windows.Forms.Label lblIp; 417 | private System.Windows.Forms.TextBox txtIp; 418 | private System.Windows.Forms.Label lblPassword; 419 | private System.Windows.Forms.TextBox txtPassword; 420 | private System.Windows.Forms.Label lblUser; 421 | private System.Windows.Forms.TextBox txtUser; 422 | private System.Windows.Forms.ListView lstViewSensor; 423 | private System.Windows.Forms.ColumnHeader colValue; 424 | private System.Windows.Forms.ColumnHeader colUnit; 425 | private System.Windows.Forms.ColumnHeader colStatus; 426 | private System.Windows.Forms.ColumnHeader colFaultThresholdMin; 427 | private System.Windows.Forms.ColumnHeader colWarningThresholdMin; 428 | private System.Windows.Forms.ColumnHeader colWarningThresholdMax; 429 | private System.Windows.Forms.ColumnHeader colFaultThresholdMax; 430 | private System.Windows.Forms.Label lblAutoRefresh; 431 | private System.Windows.Forms.NumericUpDown nbrUpDownAutoRefresh; 432 | private System.Windows.Forms.Label label3; 433 | private System.Windows.Forms.Button btnRefreshNow; 434 | private System.Windows.Forms.ColumnHeader colKey; 435 | private System.Windows.Forms.GroupBox groupBox1; 436 | private System.Windows.Forms.GroupBox groupBox2; 437 | private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1; 438 | private System.ComponentModel.BackgroundWorker background_FetchStates; 439 | private System.Windows.Forms.ProgressBar progressBar; 440 | private System.Windows.Forms.Button about_button; 441 | } 442 | } 443 | 444 | -------------------------------------------------------------------------------- /dell_fans_controller/dell_fans_controller/FormMain.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Data; 5 | using System.Diagnostics; 6 | using System.Drawing; 7 | using System.IO; 8 | using System.Text; 9 | using System.Threading; 10 | using System.Windows.Forms; 11 | 12 | namespace dell_fans_controller 13 | { 14 | public partial class frmMain : Form 15 | { 16 | private static string version = "v1.0.1"; 17 | 18 | private static string currentPath = Application.StartupPath; // System.Environment.CurrentDirectory; 19 | private static string configFileName = "\\config.ini"; 20 | private static string explorer = "explorer"; 21 | private static string ipmitoolPath = currentPath + "\\ipmitool.exe"; 22 | private static string configFilePath = currentPath + configFileName; 23 | 24 | private static string defaultIp = "127.0.0.1"; 25 | private static string defaultUser = "root"; 26 | private static string defaultPassword = "calvin"; 27 | private static string defaultConfigSection = "ipmi"; 28 | 29 | private static string execute(string parameter) 30 | { 31 | Process process = null; 32 | string result = string.Empty; 33 | try 34 | { 35 | process = new Process(); 36 | process.StartInfo.FileName = "cmd.exe"; 37 |                 process.StartInfo.UseShellExecute = false; 38 |                 process.StartInfo.CreateNoWindow = true; 39 |                 process.StartInfo.RedirectStandardInput = true; 40 |                 process.StartInfo.RedirectStandardOutput = true; 41 |                 process.StartInfo.RedirectStandardError = true; 42 | 43 | process.Start(); 44 | 45 | process.StandardInput.WriteLine(parameter + "& exit"); 46 |                 process.StandardInput.AutoFlush = true; 47 | result = process.StandardOutput.ReadToEnd(); 48 | process.WaitForExit(); 49 | process.Close(); 50 | return result; 51 | } 52 | catch (Exception ex) 53 | { 54 | Console.WriteLine("ExceptionOccurred:{ 0},{ 1}", ex.Message, ex.StackTrace.ToString()); 55 | return null; 56 | } 57 | } 58 | 59 | private void saveConfig() 60 | { 61 | string ip = txtIp.Text; 62 | string user = txtUser.Text; 63 | string password = txtPassword.Text; 64 | 65 | IniHelper.Write(defaultConfigSection, "ip", ip, configFilePath); 66 | IniHelper.Write(defaultConfigSection, "user", user, configFilePath); 67 | IniHelper.Write(defaultConfigSection, "password", password, configFilePath); 68 | } 69 | 70 | public frmMain() 71 | { 72 | InitializeComponent(); 73 | 74 | 75 | if (File.Exists(configFilePath)) 76 | { 77 | string ip = IniHelper.Read(defaultConfigSection, "ip", defaultIp, configFilePath); 78 | string user = IniHelper.Read(defaultConfigSection, "user", defaultUser, configFilePath); 79 | string password = IniHelper.Read(defaultConfigSection, "password", defaultPassword, configFilePath); 80 | txtIp.Text = ip; 81 | txtUser.Text = user; 82 | txtPassword.Text = password; 83 | } 84 | else 85 | { 86 | IniHelper.Write(defaultConfigSection, "ip", defaultIp, configFilePath); 87 | IniHelper.Write(defaultConfigSection, "user", defaultUser, configFilePath); 88 | IniHelper.Write(defaultConfigSection, "password", defaultPassword, configFilePath); 89 | txtIp.Text = defaultIp; 90 | txtUser.Text = defaultUser; 91 | txtPassword.Text = defaultPassword; 92 | } 93 | this.progressBar.Visible = false; 94 | } 95 | 96 | private void nbrUpDownSpeed_ValueChanged(object sender, EventArgs e) 97 | { 98 | trkBarSpeed.Value = (int)nbrUpDownSpeed.Value; 99 | } 100 | 101 | private void btnReset_Click(object sender, EventArgs e) 102 | { 103 | string ip = txtIp.Text; 104 | string user = txtUser.Text; 105 | string password = txtPassword.Text; 106 | 107 | string parametersReset = string.Format("-I lanplus -H {0} -U {1} -P {2} raw 0x30 0x30 0x01 0x01", ip, user, password); 108 | 109 | string fullExecuteReset = ipmitoolPath + " " + parametersReset; 110 | 111 | execute(fullExecuteReset); 112 | } 113 | 114 | private void btnSet_Click(object sender, EventArgs e) 115 | { 116 | string ip = txtIp.Text; 117 | string user = txtUser.Text; 118 | string password = txtPassword.Text; 119 | string percent = nbrUpDownSpeed.Text; 120 | int percentNum = int.Parse(percent); 121 | 122 | // string format = "%s/Dell/SysMgt/bmc/ipmitool.exe -I lanplus -H %s -U %s -P %s raw 0x30 0x30 0x01"; 123 | string formatDisableAutoMode = "-I lanplus -H {0} -U {1} -P {2} raw 0x30 0x30 0x01 0x00"; 124 | string parametersDisableAutoMode = string.Format(formatDisableAutoMode, ip, user, password); 125 | 126 | string fullExecuteDisableAutoMode = ipmitoolPath + " " + parametersDisableAutoMode; 127 | string resultDisableAutoMode = execute(fullExecuteDisableAutoMode); 128 | 129 | 130 | // format = "%s/Dell/SysMgt/bmc/ipmitool.exe -I lanplus -H %s -U %s -P %s raw 0x30 0x30 0x02 0xff 0x%02x"; 131 | string formatSetSpeed = "-I lanplus -H {0} -U {1} -P {2} raw 0x30 0x30 0x02 0xff 0x{3:x2}"; 132 | string parametersSetSpeed = string.Format(formatSetSpeed, ip, user, password, percentNum); 133 | 134 | string fullExecuteSetSpeed = ipmitoolPath + " " + parametersSetSpeed; 135 | string resultSetSpeed = execute(fullExecuteSetSpeed); 136 | 137 | // MessageBox.Show(resultDisableAutoMode + "-" + resultSetSpeed); 138 | 139 | //string cmdFormat = "/k \"{0} {1}\" & \"{2} {3}\""; 140 | //string cmdParameters = string.Format(cmdFormat, ipmitoolPath, parametersDisableAutoMode, ipmitoolPath, parametersSetSpeed); 141 | 142 | //Process.Start("cmd", cmdParameters); 143 | 144 | } 145 | 146 | private void btnVisitDellService_Click(object sender, EventArgs e) 147 | { 148 | Process.Start(explorer, "http://" + txtIp.Text); 149 | } 150 | 151 | private void trkBarSpeed_Scroll(object sender, EventArgs e) 152 | { 153 | nbrUpDownSpeed.Value = trkBarSpeed.Value; 154 | } 155 | 156 | 157 | private void btnRefreshNow_Click(object sender, EventArgs e) 158 | { 159 | background_FetchStates.RunWorkerAsync(); 160 | } 161 | 162 | private void TxtIp_LostFocus(object sender, EventArgs e) 163 | { 164 | saveConfig(); 165 | } 166 | 167 | private void TxtUser_LostFocus(object sender, EventArgs e) 168 | { 169 | saveConfig(); 170 | } 171 | 172 | private void TxtPassword_LostFocus(object sender, EventArgs e) 173 | { 174 | saveConfig(); 175 | } 176 | 177 | private void frmMain_Load(object sender, EventArgs e) 178 | { 179 | 180 | this.Text += " " + version; 181 | } 182 | 183 | private void background_FetchStates_DoWork(object sender, DoWorkEventArgs e) 184 | { 185 | BackgroundWorker bgWorker = sender as BackgroundWorker; 186 | 187 | bgWorker.ReportProgress(0, "start"); 188 | 189 | string ip = txtIp.Text; 190 | string user = txtUser.Text; 191 | string password = txtPassword.Text; 192 | 193 | string formatSensor = "-I lanplus -H {0} -U {1} -P {2} sensor"; 194 | string parametersSensor = string.Format(formatSensor, ip, user, password); 195 | 196 | string fullExecuteSensor = ipmitoolPath + " " + parametersSensor; 197 | string result = execute(fullExecuteSensor); 198 | 199 | result = result.Replace("\r\n", "\n"); 200 | string[] sensorList = result.Split('\n', '\r'); 201 | 202 | foreach (var item in sensorList) 203 | { 204 | if (item.Contains("Temp") || item.Contains("RPM") || item.Contains("Voltage") || item.Contains("Current")) 205 | { 206 | string[] temp = new string[8]; 207 | var src = item.Split('|'); 208 | temp[0] = src[0]; 209 | temp[1] = src[1]; 210 | temp[2] = src[2]; 211 | temp[3] = src[3]; 212 | temp[4] = src[5]; 213 | temp[5] = src[6]; 214 | temp[6] = src[7]; 215 | temp[7] = src[8]; 216 | 217 | bgWorker.ReportProgress(1, temp); 218 | //lstViewSensor.Items.Add(new ListViewItem(temp)); 219 | } 220 | } 221 | bgWorker.ReportProgress(100, "completed"); 222 | } 223 | 224 | private void background_FetchStates_ProgressChanged(object sender, ProgressChangedEventArgs e) 225 | { 226 | int Percentage = e.ProgressPercentage; 227 | if (Percentage == 0) 228 | { 229 | this.progressBar.Visible = true; 230 | lstViewSensor.Items.Clear(); 231 | } 232 | else if (Percentage == 1) 233 | { 234 | // 在这里更新UI 235 | string[] message = (string[])e.UserState; 236 | lstViewSensor.Items.Add(new ListViewItem(message)); 237 | } 238 | else 239 | { 240 | this.progressBar.Visible = false; 241 | } 242 | 243 | } 244 | 245 | private void about_button_Click(object sender, EventArgs e) 246 | { 247 | MessageBox.Show("Code by jiafeng5513, fork from cw1997"); 248 | } 249 | } 250 | } 251 | -------------------------------------------------------------------------------- /dell_fans_controller/dell_fans_controller/IniHelper.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Runtime.InteropServices; 3 | using System.Text; 4 | 5 | namespace dell_fans_controller 6 | { 7 | public class IniHelper 8 | { 9 | public IniHelper() 10 | { 11 | } 12 | 13 | /// 14 | /// 为INI文件中指定的节点取得字符串 15 | /// 16 | /// 欲在其中查找关键字的节点名称 17 | /// 欲获取的项名 18 | /// 指定的项没有找到时返回的默认值 19 | /// 指定一个字串缓冲区,长度至少为nSize 20 | /// 指定装载到lpReturnedString缓冲区的最大字符数量 21 | /// INI文件完整路径 22 | /// 复制到lpReturnedString缓冲区的字节数量,其中不包括那些NULL中止字符 23 | [DllImport("kernel32")] 24 | private static extern int GetPrivateProfileString(string lpAppName, string lpKeyName, string lpDefault, StringBuilder lpReturnedString, int nSize, string lpFileName); 25 | 26 | /// 27 | /// 修改INI文件中内容 28 | /// 29 | /// 欲在其中写入的节点名称 30 | /// 欲设置的项名 31 | /// 要写入的新字符串 32 | /// INI文件完整路径 33 | /// 非零表示成功,零表示失败 34 | [DllImport("kernel32")] 35 | private static extern int WritePrivateProfileString(string lpApplicationName, string lpKeyName, string lpString, string lpFileName); 36 | 37 | /// 38 | /// 读取INI文件值 39 | /// 40 | /// 节点名 41 | /// 键 42 | /// 未取到值时返回的默认值 43 | /// INI文件完整路径 44 | /// 读取的值 45 | public static string Read(string section, string key, string def, string filePath) 46 | { 47 | StringBuilder sb = new StringBuilder(1024); 48 | GetPrivateProfileString(section, key, def, sb, 1024, filePath); 49 | return sb.ToString(); 50 | } 51 | 52 | /// 53 | /// 写INI文件值 54 | /// 55 | /// 欲在其中写入的节点名称 56 | /// 欲设置的项名 57 | /// 要写入的新字符串 58 | /// INI文件完整路径 59 | /// 非零表示成功,零表示失败 60 | public static int Write(string section, string key, string value, string filePath) 61 | { 62 | //CheckPath(filePath); 63 | return WritePrivateProfileString(section, key, value, filePath); 64 | } 65 | 66 | /// 67 | /// 删除节 68 | /// 69 | /// 节点名 70 | /// INI文件完整路径 71 | /// 非零表示成功,零表示失败 72 | public static int DeleteSection(string section, string filePath) 73 | { 74 | return Write(section, null, null, filePath); 75 | } 76 | 77 | /// 78 | /// 删除键的值 79 | /// 80 | /// 节点名 81 | /// 键名 82 | /// INI文件完整路径 83 | /// 非零表示成功,零表示失败 84 | public static int DeleteKey(string section, string key, string filePath) 85 | { 86 | return Write(section, key, null, filePath); 87 | } 88 | } 89 | 90 | } 91 | -------------------------------------------------------------------------------- /dell_fans_controller/dell_fans_controller/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Windows.Forms; 4 | 5 | namespace dell_fans_controller 6 | { 7 | static class Program 8 | { 9 | /// 10 | /// 应用程序的主入口点。 11 | /// 12 | [STAThread] 13 | static void Main() 14 | { 15 | Application.EnableVisualStyles(); 16 | Application.SetCompatibleTextRenderingDefault(false); 17 | Application.Run(new frmMain()); 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /dell_fans_controller/dell_fans_controller/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // 有关程序集的一般信息由以下 6 | // 控制。更改这些特性值可修改 7 | // 与程序集关联的信息。 8 | [assembly: AssemblyTitle("dell_fans_controller")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("dell_fans_controller")] 13 | [assembly: AssemblyCopyright("Copyright © 2020")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // 将 ComVisible 设置为 false 会使此程序集中的类型 18 | //对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型 19 | //请将此类型的 ComVisible 特性设置为 true。 20 | [assembly: ComVisible(false)] 21 | 22 | // 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID 23 | [assembly: Guid("01f9ea05-3303-4446-8e37-7b43c28238dc")] 24 | 25 | // 程序集的版本信息由下列四个值组成: 26 | // 27 | // 主版本 28 | // 次版本 29 | // 生成号 30 | // 修订号 31 | // 32 | //可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值 33 | //通过使用 "*",如下所示: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /dell_fans_controller/dell_fans_controller/Properties/Resources.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // 此代码由工具生成。 4 | // 运行时版本: 4.0.30319.42000 5 | // 6 | // 对此文件的更改可能导致不正确的行为,如果 7 | // 重新生成代码,则所做更改将丢失。 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace dell_fans_controller.Properties 12 | { 13 | 14 | 15 | /// 16 | /// 强类型资源类,用于查找本地化字符串等。 17 | /// 18 | // 此类是由 StronglyTypedResourceBuilder 19 | // 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。 20 | // 若要添加或删除成员,请编辑 .ResX 文件,然后重新运行 ResGen 21 | // (以 /str 作为命令选项),或重新生成 VS 项目。 22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] 23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 25 | internal class Resources 26 | { 27 | 28 | private static global::System.Resources.ResourceManager resourceMan; 29 | 30 | private static global::System.Globalization.CultureInfo resourceCulture; 31 | 32 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] 33 | internal Resources() 34 | { 35 | } 36 | 37 | /// 38 | /// 返回此类使用的缓存 ResourceManager 实例。 39 | /// 40 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 41 | internal static global::System.Resources.ResourceManager ResourceManager 42 | { 43 | get 44 | { 45 | if ((resourceMan == null)) 46 | { 47 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("dell_fans_controller.Properties.Resources", typeof(Resources).Assembly); 48 | resourceMan = temp; 49 | } 50 | return resourceMan; 51 | } 52 | } 53 | 54 | /// 55 | /// 覆盖当前线程的 CurrentUICulture 属性 56 | /// 使用此强类型的资源类的资源查找。 57 | /// 58 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 59 | internal static global::System.Globalization.CultureInfo Culture 60 | { 61 | get 62 | { 63 | return resourceCulture; 64 | } 65 | set 66 | { 67 | resourceCulture = value; 68 | } 69 | } 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /dell_fans_controller/dell_fans_controller/Properties/Resources.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | text/microsoft-resx 107 | 108 | 109 | 2.0 110 | 111 | 112 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 113 | 114 | 115 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | -------------------------------------------------------------------------------- /dell_fans_controller/dell_fans_controller/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace dell_fans_controller.Properties 12 | { 13 | 14 | 15 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 16 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] 17 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase 18 | { 19 | 20 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 21 | 22 | public static Settings Default 23 | { 24 | get 25 | { 26 | return defaultInstance; 27 | } 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /dell_fans_controller/dell_fans_controller/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /dell_fans_controller/dell_fans_controller/dell.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jiafeng5513/dell_fans_controller/8532d997c4dbe5c03ec22dfedd1533258ea4266c/dell_fans_controller/dell_fans_controller/dell.ico -------------------------------------------------------------------------------- /dell_fans_controller/dell_fans_controller/dell_fans_controller.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {01F9EA05-3303-4446-8E37-7B43C28238DC} 8 | WinExe 9 | dell_fans_controller 10 | dell_fans_controller 11 | v2.0 12 | 512 13 | true 14 | false 15 | publish\ 16 | true 17 | Disk 18 | false 19 | Foreground 20 | 7 21 | Days 22 | false 23 | false 24 | true 25 | 1 26 | 1.0.0.%2a 27 | false 28 | true 29 | true 30 | 31 | 32 | AnyCPU 33 | true 34 | full 35 | false 36 | bin\Debug\ 37 | DEBUG;TRACE 38 | prompt 39 | 4 40 | 41 | 42 | AnyCPU 43 | pdbonly 44 | true 45 | bin\Release\ 46 | TRACE 47 | prompt 48 | 4 49 | 50 | 51 | 974FCA397D2202D377050D9C0E46AD199904D5B5 52 | 53 | 54 | dell_fans_controller_TemporaryKey.pfx 55 | 56 | 57 | true 58 | 59 | 60 | false 61 | 62 | 63 | dell.ico 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | Form 76 | 77 | 78 | FormMain.cs 79 | 80 | 81 | 82 | 83 | 84 | FormMain.cs 85 | 86 | 87 | ResXFileCodeGenerator 88 | Resources.Designer.cs 89 | Designer 90 | 91 | 92 | True 93 | Resources.resx 94 | 95 | 96 | SettingsSingleFileGenerator 97 | Settings.Designer.cs 98 | 99 | 100 | True 101 | Settings.settings 102 | True 103 | 104 | 105 | 106 | 107 | False 108 | .NET Framework 3.5 SP1 109 | true 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | xcopy $(SolutionDir)\Dell\SysMgt\bmc\* /y 118 | 119 | --------------------------------------------------------------------------------