Linuxスクリプトと2台の異なるSolarisマシンがあります。1台はISO-8859-1
もう1台です。UTF-8
実行するとUTF-8
正常に動作しますが、ISOではエラーが発生します。
どのように実行する必要がありますか。
私のscritをsolarisにコピーすると、isoがあり、そこで実行するとエラーなしで正常に動作します
私の実行コード:
using (var sftp = new Sftp())
{
try
{
sftp.Connect(target.FullyQualifiedDomainName);
sftp.Authenticate(target.UserName, crypto.TwoWayDecrypt(target.Password));
sftp.Put(AssemblyDirectory + "\\Scripts\\solaris_perf_data.sh", "perf_data.sh", CopyMode.Copy);
}
finally
{
sftp.Close();
}
}
ssh.Execute(chModCommand);
//error here
result = ssh.Execute(executeCommand).ToString();
私が得るエラーは次のとおりです。
copying script file and executing script on host Solaris 10 region settings
(france). Error Message: System.IO.IOException: ./perf_data.sh[5]:
TotSize==+utilisés,: numéro incorrect at Dart.Ssh.Ssh.Execute(String command,
Object state) at Virtustream.CAS.DataCollector.Library.DataCollectors.SolarisDataCollector.GetData(Boolean
isInventory, String subject, String executeCommand)