Troubleshooting with Swiftclient

UCDN
2018-06-27 15:07

Swiftclient can be used to debug your swift's objects and to determine whether there are any issues with them. You can check this page how to download swiftclient and basic usage:
Swiftclient

Check your container stats

swift --os-username YOUR_USERNAME --os-tenant-name YOUR_TENANT --os-password YOUR_PASSWORD --os-auth-url https://auth.files.nl01.cloud.servers.com:5000/v2.0/ stat YOUR_CONTAINER

Account:
Container: test2
Objects: 0
Bytes: 0
Read ACL: .r:*,.rlistings               
Write ACL:
Sync To:
Sync Key:
Accept-Ranges: bytes
X-Timestamp: 1436262476.77998
Content-Type: text/plain; charset=utf-8

With this command you can check your container objects' number and size, ACL, synchronization URL etc.

Check your object's headers

swift --os-username YOUR_USERNAME --os-tenant-name YOUR_TENANT --os-password YOUR_PASSWORD --os-auth-url https://auth.files.nl01.cloud.servers.com:5000/v2.0/ stat YOUR_CONTAINER FILE

Account:
Container:
Object: test.mp4
Content Type: video/mp4
Content Length: 32037854
Last Modified:
ETag:
Meta Mtime: 1434002653
Accept-Ranges: bytes
X-Timestamp: 1436194451.06674

Here you can check object's content type headers which is important for streaming videos, length, last modified etc

Tags: Swiftclient, Troubleshooting